diff --git a/defines.h b/defines.h index d5c8616e18fa0a8d0ee2af4fb6dadebd87540e3c..2df4a3a811dbb0968037312fbc13c19dfafd3676 100644 --- a/defines.h +++ b/defines.h @@ -73,8 +73,6 @@ #define MAX_ENERGY 99.9 #define MAX_VELOCITY 20 -#define GAME_START_SHORTCUT Qt::Key_Space - #define ID_EXPLOSION 1351 #define ID_MINE1 1352 #define ID_MINE2 1353 diff --git a/mainview.cpp b/mainview.cpp index 6126c6d513e48957b7ad8bb30f42fd5e97694ad0..72a9e10b23fa5df14ac33f24b2aee5015f708f57 100644 --- a/mainview.cpp +++ b/mainview.cpp @@ -521,7 +521,7 @@ void MyMainView::newRound() //field.update(); QString str = i18n("Press %1 to start", - QKeySequence(GAME_START_SHORTCUT).toString(QKeySequence::NativeText)); + actionCollection->action("game_start")->shortcut().toString(QKeySequence::NativeText)); emit(setStatusText(str,IDS_MAIN)); emit(setStatusText( QLatin1String( "" ), IDS_PAUSE )); stop( ); @@ -589,7 +589,7 @@ void MyMainView::timerEvent(QTimerEvent *event) textSprite->setPos(QPointF((width()-textSprite->boundingRect().width()) / 2,height()/2-90)); QString str = i18n("Press %1 for new round", - QKeySequence(GAME_START_SHORTCUT).toString(QKeySequence::NativeText)); + actionCollection->action("game_start")->shortcut().toString(QKeySequence::NativeText)); emit(setStatusText(str,IDS_MAIN)); stop( ); } diff --git a/topwidget.cpp b/topwidget.cpp index 56e931440d7608efc0910579608956828c369f11..2c4175551980e7fb6ec4547cd6c37b695ef95f60 100644 --- a/topwidget.cpp +++ b/topwidget.cpp @@ -105,7 +105,7 @@ void MyTopLevelWidget::setupActions() QAction *gameStart = actionCollection()->addAction( QLatin1String( "game_start" ) ); gameStart->setText( i18nc( "start game","Start" ) ); connect(gameStart, SIGNAL(triggered(bool)), playfield, SLOT(start())); - gameStart->setShortcut(GAME_START_SHORTCUT); + gameStart->setShortcut(Qt::Key_Space); playfield->addAction(gameStart); KStandardAction::preferences(playfield, SLOT(gameSetup()), actionCollection());