FrankBuss / kerberos

C64/C128 MIDI flash interface
73 stars 17 forks source link

Kerberos App for older Mac OS X versions #2

Open FrankBuss opened 10 years ago

FrankBuss commented 10 years ago

Feature request to provide the Kerberos App for Mac OS X before version 10.7, which is required for Qt 5. One idea is to use Qt 4.8. Someone started already and looks like it compiles with the patch you can see below. But needs some more work to use the two resources as external files and for the deployment script.

diff --git a/qt/mainwindow.cpp b/qt/mainwindow.cpp
index 204d8e4..84673b2 100644
--- a/qt/mainwindow.cpp
+++ b/qt/mainwindow.cpp
@@ -1670,11 +1670,21 @@ void MainWindow::openD64File(QString filename)
     d64DirectoryTableView->setModel(model);
     d64DirectoryTableView->verticalHeader()->hide();
     d64DirectoryTableView->resizeColumnsToContents();
+#ifdef USE_QT5
     d64DirectoryTableView->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
+#else
+    d64DirectoryTableView->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
+#endif
     d64DirectoryTableView->setSelectionBehavior(QAbstractItemView::SelectRows);
+#ifdef USE_QT5
     d64DirectoryTableView->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
     d64DirectoryTableView->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch);
     d64DirectoryTableView->horizontalHeader()->setSectionResizeMode(2, QHeaderView::ResizeToContents);
+#else
+    d64DirectoryTableView->horizontalHeader()->setResizeMode(0, QHeaderView::ResizeToContents);
+    d64DirectoryTableView->horizontalHeader()->setResizeMode(1, QHeaderView::Stretch);
+    d64DirectoryTableView->horizontalHeader()->setResizeMode(2, QHeaderView::ResizeToContents);
+#endif

     // show title and free blocks
     d64DiskName->setText(m_localD64Disk.getDirectoryTitle());
@@ -1718,11 +1728,21 @@ void MainWindow::onReadDirectory()
             remoteDirectoryTableView->setModel(model);
             remoteDirectoryTableView->verticalHeader()->hide();
             remoteDirectoryTableView->resizeColumnsToContents();
+#ifdef USE_QT5
             remoteDirectoryTableView->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
+#else
+            remoteDirectoryTableView->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
+#endif
             remoteDirectoryTableView->setSelectionBehavior(QAbstractItemView::SelectRows);
+#ifdef USE_QT5
             remoteDirectoryTableView->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
             remoteDirectoryTableView->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch);
             remoteDirectoryTableView->horizontalHeader()->setSectionResizeMode(2, QHeaderView::ResizeToContents);
+#else
+            remoteDirectoryTableView->horizontalHeader()->setResizeMode(0, QHeaderView::ResizeToContents);
+            remoteDirectoryTableView->horizontalHeader()->setResizeMode(1, QHeaderView::Stretch);
+            remoteDirectoryTableView->horizontalHeader()->setResizeMode(2, QHeaderView::ResizeToContents);
+#endif

             // show title and free blocks
             remoteDiskName->setText(m_remoteD64Disk.getDirectoryTitle());