summaryrefslogtreecommitdiffstats
path: root/examples/tools/undoframework
diff options
context:
space:
mode:
authorNorwegian Rock Cat <qt-info@nokia.com>2009-05-12 11:03:20 (GMT)
committerNorwegian Rock Cat <qt-info@nokia.com>2009-05-12 11:05:19 (GMT)
commitaecb4af947acd5e5c4a59641512269348ca97f07 (patch)
treea0e96b051e6ceae2fdd2f9019f1a086179769959 /examples/tools/undoframework
parent61b7057cd2ec4688592ad5d13a55b75b18c8d8a5 (diff)
downloadQt-aecb4af947acd5e5c4a59641512269348ca97f07.zip
Qt-aecb4af947acd5e5c4a59641512269348ca97f07.tar.gz
Qt-aecb4af947acd5e5c4a59641512269348ca97f07.tar.bz2
Replace all instances of "Ctrl+Q" with QKeySequence::Quit.
We introduce this new enum, we should be using it.
Diffstat (limited to 'examples/tools/undoframework')
-rw-r--r--examples/tools/undoframework/mainwindow.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/tools/undoframework/mainwindow.cpp b/examples/tools/undoframework/mainwindow.cpp
index f912ff2..bf0aa41 100644
--- a/examples/tools/undoframework/mainwindow.cpp
+++ b/examples/tools/undoframework/mainwindow.cpp
@@ -101,16 +101,14 @@ void MainWindow::createActions()
//! [5]
undoAction = undoStack->createUndoAction(this, tr("&Undo"));
- undoAction->setShortcut(tr("Ctrl+Z"));
+ undoAction->setShortcuts(QKeySequence::Undo);
redoAction = undoStack->createRedoAction(this, tr("&Redo"));
- QList<QKeySequence> redoShortcuts;
- redoShortcuts << tr("Ctrl+Y") << tr("Shift+Ctrl+Z");
- redoAction->setShortcuts(redoShortcuts);
+ redoAction->setShortcuts(QKeySequence::Redo);
//! [5]
exitAction = new QAction(tr("E&xit"), this);
- exitAction->setShortcut(tr("Ctrl+Q"));
+ exitAction->setShortcuts(QKeySequence::Quit);
connect(exitAction, SIGNAL(triggered()), this, SLOT(close()));
aboutAction = new QAction(tr("&About"), this);