From 6c9317dccf3ae28b7c769d21a0481987ebacf686 Mon Sep 17 00:00:00 2001 From: Michael Pyne Date: Mon, 17 Dec 2007 23:02:17 +0000 Subject: [PATCH] Modifier keys are different from the keycode itself apparently; fix broken keyboard shortcuts in abakus. svn path=/trunk/playground/utils/abakus/; revision=749809 --- src/mainwindow.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8d8abe8..3513ca7 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -504,39 +504,39 @@ void MainWindow::setupLayout() KToggleAction *ta = ac->add("setDegreesMode", this, SLOT(slotDegrees())); ta->setText(i18n("&Degrees")); - ta->setShortcut(Qt::Key_Shift | Qt::Key_Alt | Qt::Key_D); + ta->setShortcut(Qt::SHIFT | Qt::ALT | Qt::Key_D); ta->setActionGroup(trigModeGroup); ta->setChecked(trigMode() == Abakus::Degrees); ta = ac->add("setRadiansMode", this, SLOT(slotRadians())); ta->setText(i18n("&Radians")); - ta->setShortcut(Qt::Key_Shift + Qt::Key_Alt + Qt::Key_R); + ta->setShortcut(Qt::SHIFT + Qt::ALT + Qt::Key_R); ta->setActionGroup(trigModeGroup); ta->setChecked(trigMode() == Abakus::Radians); ta = ac->add("toggleHistoryList", this, SLOT(slotToggleHistoryList())); ta->setText(i18n("Show &History List")); - ta->setShortcut(Qt::Key_Shift + Qt::Key_Alt + Qt::Key_H); + ta->setShortcut(Qt::SHIFT + Qt::ALT + Qt::Key_H); ta->setChecked(true); ta = ac->add("toggleVariableList", this, SLOT(slotToggleVariableList())); ta->setText(i18n("Show &Variables")); - ta->setShortcut(Qt::Key_Shift + Qt::Key_Alt + Qt::Key_V); + ta->setShortcut(Qt::SHIFT + Qt::ALT + Qt::Key_V); ta->setChecked(true); ta = ac->add("toggleFunctionList", this, SLOT(slotToggleFunctionList())); ta->setText(i18n("Show &Functions")); - ta->setShortcut(Qt::Key_Shift + Qt::Key_Alt + Qt::Key_F); + ta->setShortcut(Qt::SHIFT + Qt::ALT + Qt::Key_F); ta->setChecked(true); ta = ac->add("toggleCompactMode", this, SLOT(slotToggleCompactMode())); ta->setText(i18n("Activate &Compact Mode")); - ta->setShortcut(Qt::Key_Shift + Qt::Key_Alt + Qt::Key_C); + ta->setShortcut(Qt::SHIFT + Qt::ALT + Qt::Key_C); ta->setChecked(false); ta = ac->add("toggleExpressionMode", this, SLOT(slotToggleExpressionMode())); ta->setText(i18n("Use R&PN Mode")); - ta->setShortcut(Qt::Key_Shift + Qt::Key_Alt + Qt::Key_P); + ta->setShortcut(Qt::SHIFT + Qt::ALT + Qt::Key_P); ta->setChecked(false); QActionGroup *precisionGroup = new QActionGroup(ac); @@ -570,7 +570,7 @@ void MainWindow::setupLayout() QAction *a = ac->addAction("clearHistory", m_result, SLOT(clear())); a->setText(i18n("Clear &History")); a->setIcon(KIcon("editclear")); - ta->setShortcut(Qt::Key_Shift + Qt::Key_Alt + Qt::Key_L); + ta->setShortcut(Qt::SHIFT + Qt::ALT + Qt::Key_L); a = ac->addAction("select_edit", m_edit, SLOT(setFocus())); a->setIcon(KIcon("goto")); -- GitLab