Commit b6ce9c70 authored by Andrius Štikonas's avatar Andrius Štikonas

Show both shortcuts for pause action.

parent b5372a7b
...@@ -244,8 +244,8 @@ void KGoldrunner::setupActions() ...@@ -244,8 +244,8 @@ void KGoldrunner::setupActions()
actionCollection()->addAction (myPause->objectName(), myPause); actionCollection()->addAction (myPause->objectName(), myPause);
gameMapper->setMapping (myPause, PAUSE); gameMapper->setMapping (myPause, PAUSE);
// QAction * myPause gets QAction::shortcut(), returning 1 OR 2 shortcuts. // QAction * myPause gets QAction::shortcut(), returning 1 OR 2 shortcuts.
QKeySequence pauseShortcut = myPause->shortcut(); QList<QKeySequence> pauseShortcut = { myPause->shortcut(), Qt::Key_Escape };
myPause->setShortcut (pauseShortcut); myPause->setShortcuts (pauseShortcut);
highScore = KStandardGameAction::highscores (gameMapper, SLOT(map()), this); highScore = KStandardGameAction::highscores (gameMapper, SLOT(map()), this);
actionCollection()->addAction (highScore->objectName(), highScore); actionCollection()->addAction (highScore->objectName(), highScore);
...@@ -745,7 +745,7 @@ void KGoldrunner::gameFreeze (bool on_off) ...@@ -745,7 +745,7 @@ void KGoldrunner::gameFreeze (bool on_off)
frozen = on_off; // Remember the state (for the configure-keys case). frozen = on_off; // Remember the state (for the configure-keys case).
QStringList pauseKeys; QStringList pauseKeys;
const auto keyBindings = myPause->shortcut().keyBindings(QKeySequence::StandardKey::Cancel); const auto keyBindings = myPause->shortcuts();
for (const QKeySequence &s : keyBindings) { for (const QKeySequence &s : keyBindings) {
pauseKeys.append(s.toString(QKeySequence::NativeText)); pauseKeys.append(s.toString(QKeySequence::NativeText));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment