summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Walch <[email protected]>2016-05-09 05:32:18 +0200
committerMartin Walch <[email protected]>2016-05-09 05:32:18 +0200
commitd1168472173a55c62695962eb0d0024151c5facc (patch)
treedcc492b17778988ec7cd4e6c80bf9a162d42fb98
parentec1b1e82a3273d2240b88607fdec02a4fe22ea5c (diff)
Use KActionCollection::setDefaultShortcut for select_carddeck shortcut (F10)
KXMLGuiFactory complains: > Shortcut for action "select_carddeck" "Select &Card Deck..." set with > QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead. Do so accordingly. This also moves away from deprecated KShortcut. REVIEW:127856
-rw-r--r--src/mainwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index b2c6d6f..2bdbb7e 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -22,6 +22,7 @@
// Include files for Qt
#include <QAction>
+#include <QKeySequence>
#include <QPointer>
// Include files for KDE
@@ -41,7 +42,6 @@
#include <ktoolbar.h>
#include <kselectaction.h>
#include <kapplication.h>
-#include <KShortcut>
// Application specific includes
#include "lskatglobal.h"
#include "gameview.h"
@@ -442,7 +442,7 @@ void Mainwindow::initGUI()
// Choose card deck
QAction *action1 = actionCollection()->addAction(QLatin1String("select_carddeck"));
action1->setText(i18n("Select &Card Deck..."));
- action1->setShortcuts(KShortcut(Qt::Key_F10));
+ actionCollection()->setDefaultShortcut(action1, QKeySequence(Qt::Key_F10));
connect(action1, SIGNAL(triggered(bool)), this, SLOT(menuCardDeck()));
action1->setToolTip(i18n("Configure card decks..."));
action1->setWhatsThis(i18n("Choose how the cards should look."));