From a7fda83ea558cbab4d40fce8fa038a7525208cc4 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 30 Dec 2023 23:05:49 -0500 Subject: [PATCH] Reintroduce shortcuts; eliminate bad auto-UI additions. --- OSBindings/Qt/mainwindow.cpp | 8 ++++-- OSBindings/Qt/mainwindow.ui | 50 ++++++++++++++++++------------------ 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/OSBindings/Qt/mainwindow.cpp b/OSBindings/Qt/mainwindow.cpp index 7e4df42f6..85c038a74 100644 --- a/OSBindings/Qt/mainwindow.cpp +++ b/OSBindings/Qt/mainwindow.cpp @@ -399,13 +399,17 @@ void MainWindow::launchMachine() { QAction *const asKeyboardAction = new QAction(tr("Use Keyboard as Keyboard"), this); asKeyboardAction->setCheckable(true); asKeyboardAction->setChecked(true); - // asKeyboardAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_K)); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + asKeyboardAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_K)); +#endif inputMenu->addAction(asKeyboardAction); QAction *const asJoystickAction = new QAction(tr("Use Keyboard as Joystick"), this); asJoystickAction->setCheckable(true); asJoystickAction->setChecked(false); - // asJoystickAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_J)); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + asJoystickAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_J)); +#endif inputMenu->addAction(asJoystickAction); connect(asKeyboardAction, &QAction::triggered, this, [=] { diff --git a/OSBindings/Qt/mainwindow.ui b/OSBindings/Qt/mainwindow.ui index ab25f2df6..eac216907 100644 --- a/OSBindings/Qt/mainwindow.ui +++ b/OSBindings/Qt/mainwindow.ui @@ -39,7 +39,7 @@ - + Chip RAM: @@ -65,7 +65,7 @@ - + Fast RAM: @@ -129,7 +129,7 @@ - + Model: @@ -160,7 +160,7 @@ - + Disk Controller: @@ -214,7 +214,7 @@ - + Model: @@ -240,7 +240,7 @@ - + Memory Size: @@ -294,7 +294,7 @@ - + Model: @@ -348,7 +348,7 @@ - + RAM: @@ -437,7 +437,7 @@ - + Model: @@ -463,7 +463,7 @@ - + Speed: @@ -484,7 +484,7 @@ - + EXOS: @@ -510,7 +510,7 @@ - + BASIC: @@ -541,7 +541,7 @@ - + DOS: @@ -590,7 +590,7 @@ - + Model: @@ -649,7 +649,7 @@ - + Model @@ -691,7 +691,7 @@ - + Region @@ -772,7 +772,7 @@ - + Model: @@ -798,7 +798,7 @@ - + Disk Interface: @@ -862,7 +862,7 @@ - + Video Adaptor: @@ -883,7 +883,7 @@ - + Speed: @@ -932,7 +932,7 @@ - + Region: @@ -968,7 +968,7 @@ - + Memory Size: @@ -1042,7 +1042,7 @@ - + Memory Size: @@ -1111,7 +1111,7 @@ - + Memory Size: @@ -1160,7 +1160,7 @@ - + Model: