summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTasuku Suzuki <stasuku@gmail.com>2013-12-21 14:01:41 +0900
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-09 15:54:26 +0100
commit2aba84b72e3ff110209da3ba1bdca07d3d21522c (patch)
treea78dcbe9a11c8390c015dd02afcd4084d07a38a6
parentf22850f46b5fdfbe58681e92750addb8d4c3df3f (diff)
downloadqttools-2aba84b72e3ff110209da3ba1bdca07d3d21522c.tar.gz
qttools-2aba84b72e3ff110209da3ba1bdca07d3d21522c.tar.bz2
qttools-2aba84b72e3ff110209da3ba1bdca07d3d21522c.zip
assign a shortcut key to the Quit action in qdbusviewer
Change-Id: I5c1f99741ba203c0fc405d49df51357ebf52e199 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
-rw-r--r--src/qdbus/qdbusviewer/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qdbus/qdbusviewer/main.cpp b/src/qdbus/qdbusviewer/main.cpp
index 5499192c..f539230b 100644
--- a/src/qdbus/qdbusviewer/main.cpp
+++ b/src/qdbus/qdbusviewer/main.cpp
@@ -82,7 +82,8 @@ int main(int argc, char *argv[])
QMenu *fileMenu = mw.menuBar()->addMenu(QObject::tr("&File"));
QAction *quitAction = fileMenu->addAction(QObject::tr("&Quit"), &mw, SLOT(close()));
- Q_UNUSED(quitAction);
+ quitAction->setShortcut(QKeySequence::Quit);
+ quitAction->setMenuRole(QAction::QuitRole);
QMenu *helpMenu = mw.menuBar()->addMenu(QObject::tr("&Help"));
QAction *aboutAction = helpMenu->addAction(QObject::tr("&About"));