summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorwegian Rock Cat <qt-info@nokia.com>2009-05-12 13:03:20 +0200
committerNorwegian Rock Cat <qt-info@nokia.com>2009-05-12 13:05:19 +0200
commitaecb4af947acd5e5c4a59641512269348ca97f07 (patch)
treea0e96b051e6ceae2fdd2f9019f1a086179769959
parent61b7057cd2ec4688592ad5d13a55b75b18c8d8a5 (diff)
downloadqt4-tools-aecb4af947acd5e5c4a59641512269348ca97f07.tar.gz
Replace all instances of "Ctrl+Q" with QKeySequence::Quit.
We introduce this new enum, we should be using it.
-rw-r--r--examples/assistant/simpletextviewer/mainwindow.cpp6
-rw-r--r--examples/draganddrop/puzzle/mainwindow.cpp4
-rw-r--r--examples/graphicsview/diagramscene/mainwindow.cpp2
-rw-r--r--examples/help/simpletextviewer/mainwindow.cpp6
-rw-r--r--examples/itemviews/chart/mainwindow.cpp6
-rw-r--r--examples/itemviews/pixelator/mainwindow.cpp6
-rw-r--r--examples/itemviews/puzzle/mainwindow.cpp4
-rw-r--r--examples/itemviews/simpledommodel/mainwindow.cpp4
-rw-r--r--examples/linguist/arrowpad/mainwindow.cpp2
-rw-r--r--examples/mainwindows/application/mainwindow.cpp2
-rw-r--r--examples/mainwindows/dockwidgets/mainwindow.cpp2
-rw-r--r--examples/mainwindows/mdi/mainwindow.cpp2
-rw-r--r--examples/mainwindows/menus/mainwindow.cpp8
-rw-r--r--examples/mainwindows/recentfiles/mainwindow.cpp2
-rw-r--r--examples/mainwindows/sdi/mainwindow.cpp2
-rw-r--r--examples/opengl/grabber/mainwindow.cpp2
-rw-r--r--examples/painting/svgviewer/mainwindow.cpp2
-rw-r--r--examples/phonon/musicplayer/mainwindow.cpp2
-rw-r--r--examples/richtext/orderform/mainwindow.cpp6
-rw-r--r--examples/richtext/syntaxhighlighter/mainwindow.cpp11
-rw-r--r--examples/sql/masterdetail/mainwindow.cpp2
-rw-r--r--examples/tools/codecs/mainwindow.cpp4
-rw-r--r--examples/tools/plugandpaint/mainwindow.cpp6
-rw-r--r--examples/tools/settingseditor/mainwindow.cpp4
-rw-r--r--examples/tools/undoframework/mainwindow.cpp8
-rw-r--r--examples/webkit/formextractor/mainwindow.cpp2
-rw-r--r--examples/webkit/previewer/mainwindow.cpp6
-rw-r--r--examples/widgets/icons/mainwindow.cpp2
-rw-r--r--examples/widgets/scribble/mainwindow.cpp4
-rw-r--r--examples/widgets/tablet/mainwindow.cpp6
-rw-r--r--examples/xml/dombookmarks/mainwindow.cpp6
-rw-r--r--examples/xml/saxbookmarks/mainwindow.cpp6
-rw-r--r--examples/xml/streambookmarks/mainwindow.cpp6
-rw-r--r--examples/xmlpatterns/trafficinfo/mainwindow.cpp2
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp2
-rw-r--r--tools/designer/src/designer/qdesigner_actions.cpp2
36 files changed, 73 insertions, 76 deletions
diff --git a/examples/assistant/simpletextviewer/mainwindow.cpp b/examples/assistant/simpletextviewer/mainwindow.cpp
index cc2f3c0486..f7c7098e49 100644
--- a/examples/assistant/simpletextviewer/mainwindow.cpp
+++ b/examples/assistant/simpletextviewer/mainwindow.cpp
@@ -101,11 +101,11 @@ void MainWindow::open()
void MainWindow::createActions()
{
assistantAct = new QAction(tr("Help Contents"), this);
- assistantAct->setShortcut(tr("F1"));
+ assistantAct->setShortcuts(QKeySequence::HelpContents);
connect(assistantAct, SIGNAL(triggered()), this, SLOT(assistant()));
openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcut(tr("Ctrl+O"));
+ openAct->setShortcuts(QKeySequence::Open);
connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
clearAct = new QAction(tr("&Clear"), this);
@@ -113,7 +113,7 @@ void MainWindow::createActions()
connect(clearAct, SIGNAL(triggered()), textViewer, SLOT(clear()));
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
aboutAct = new QAction(tr("&About"), this);
diff --git a/examples/draganddrop/puzzle/mainwindow.cpp b/examples/draganddrop/puzzle/mainwindow.cpp
index f998882e9e..9035442007 100644
--- a/examples/draganddrop/puzzle/mainwindow.cpp
+++ b/examples/draganddrop/puzzle/mainwindow.cpp
@@ -120,10 +120,10 @@ void MainWindow::setupMenus()
QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
QAction *openAction = fileMenu->addAction(tr("&Open..."));
- openAction->setShortcut(QKeySequence(tr("Ctrl+O")));
+ openAction->setShortcuts(QKeySequence::Open);
QAction *exitAction = fileMenu->addAction(tr("E&xit"));
- exitAction->setShortcut(QKeySequence(tr("Ctrl+Q")));
+ exitAction->setShortcuts(QKeySequence::Quit);
QMenu *gameMenu = menuBar()->addMenu(tr("&Game"));
diff --git a/examples/graphicsview/diagramscene/mainwindow.cpp b/examples/graphicsview/diagramscene/mainwindow.cpp
index b536a7af85..78fac30f88 100644
--- a/examples/graphicsview/diagramscene/mainwindow.cpp
+++ b/examples/graphicsview/diagramscene/mainwindow.cpp
@@ -401,7 +401,7 @@ void MainWindow::createActions()
this, SLOT(deleteItem()));
exitAction = new QAction(tr("E&xit"), this);
- exitAction->setShortcut(tr("Ctrl+X"));
+ exitAction->setShortcuts(QKeySequence::Quit);
exitAction->setStatusTip(tr("Quit Scenediagram example"));
connect(exitAction, SIGNAL(triggered()), this, SLOT(close()));
diff --git a/examples/help/simpletextviewer/mainwindow.cpp b/examples/help/simpletextviewer/mainwindow.cpp
index fc9af58658..33092ca679 100644
--- a/examples/help/simpletextviewer/mainwindow.cpp
+++ b/examples/help/simpletextviewer/mainwindow.cpp
@@ -102,12 +102,12 @@ void MainWindow::open()
void MainWindow::createActions()
{
assistantAct = new QAction(tr("Help Contents"), this);
- assistantAct->setShortcut(tr("F1"));
+ assistantAct->setShortcut(QKeySequence::HelpContents);
connect(assistantAct, SIGNAL(triggered()), this, SLOT(showDocumentation()));
//! [4]
openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcut(tr("Ctrl+O"));
+ openAct->setShortcut(QKeySequence::Open);
connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
clearAct = new QAction(tr("&Clear"), this);
@@ -115,7 +115,7 @@ void MainWindow::createActions()
connect(clearAct, SIGNAL(triggered()), textViewer, SLOT(clear()));
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
aboutAct = new QAction(tr("&About"), this);
diff --git a/examples/itemviews/chart/mainwindow.cpp b/examples/itemviews/chart/mainwindow.cpp
index 208a4658b5..d065558823 100644
--- a/examples/itemviews/chart/mainwindow.cpp
+++ b/examples/itemviews/chart/mainwindow.cpp
@@ -48,11 +48,11 @@ MainWindow::MainWindow()
{
QMenu *fileMenu = new QMenu(tr("&File"), this);
QAction *openAction = fileMenu->addAction(tr("&Open..."));
- openAction->setShortcut(QKeySequence(tr("Ctrl+O")));
+ openAction->setShortcuts(QKeySequence::Open);
QAction *saveAction = fileMenu->addAction(tr("&Save As..."));
- saveAction->setShortcut(QKeySequence(tr("Ctrl+S")));
+ saveAction->setShortcuts(QKeySequence::SaveAs);
QAction *quitAction = fileMenu->addAction(tr("E&xit"));
- quitAction->setShortcut(QKeySequence(tr("Ctrl+Q")));
+ quitAction->setShortcuts(QKeySequence::Quit);
setupModel();
setupViews();
diff --git a/examples/itemviews/pixelator/mainwindow.cpp b/examples/itemviews/pixelator/mainwindow.cpp
index a2b98cf63d..80cfc5c0b7 100644
--- a/examples/itemviews/pixelator/mainwindow.cpp
+++ b/examples/itemviews/pixelator/mainwindow.cpp
@@ -79,14 +79,14 @@ MainWindow::MainWindow()
QMenu *fileMenu = new QMenu(tr("&File"), this);
QAction *openAction = fileMenu->addAction(tr("&Open..."));
- openAction->setShortcut(QKeySequence(tr("Ctrl+O")));
+ openAction->setShortcuts(QKeySequence::Open);
printAction = fileMenu->addAction(tr("&Print..."));
printAction->setEnabled(false);
- printAction->setShortcut(QKeySequence(tr("Ctrl+P")));
+ printAction->setShortcut(QKeySequence::Print);
QAction *quitAction = fileMenu->addAction(tr("E&xit"));
- quitAction->setShortcut(QKeySequence(tr("Ctrl+Q")));
+ quitAction->setShortcuts(QKeySequence::Quit);
QMenu *helpMenu = new QMenu(tr("&Help"), this);
QAction *aboutAction = helpMenu->addAction(tr("&About"));
diff --git a/examples/itemviews/puzzle/mainwindow.cpp b/examples/itemviews/puzzle/mainwindow.cpp
index c6088f69db..a5ba236a74 100644
--- a/examples/itemviews/puzzle/mainwindow.cpp
+++ b/examples/itemviews/puzzle/mainwindow.cpp
@@ -107,10 +107,10 @@ void MainWindow::setupMenus()
QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
QAction *openAction = fileMenu->addAction(tr("&Open..."));
- openAction->setShortcut(QKeySequence(tr("Ctrl+O")));
+ openAction->setShortcuts(QKeySequence::Open);
QAction *exitAction = fileMenu->addAction(tr("E&xit"));
- exitAction->setShortcut(QKeySequence(tr("Ctrl+Q")));
+ exitAction->setShortcuts(QKeySequence::Quit);
QMenu *gameMenu = menuBar()->addMenu(tr("&Game"));
diff --git a/examples/itemviews/simpledommodel/mainwindow.cpp b/examples/itemviews/simpledommodel/mainwindow.cpp
index ac968998c9..73626b1d99 100644
--- a/examples/itemviews/simpledommodel/mainwindow.cpp
+++ b/examples/itemviews/simpledommodel/mainwindow.cpp
@@ -50,9 +50,9 @@ MainWindow::MainWindow() : QMainWindow(), model(0)
{
fileMenu = menuBar()->addMenu(tr("&File"));
fileMenu->addAction(tr("&Open..."), this, SLOT(openFile()),
- QKeySequence(tr("Ctrl+O")));
+ QKeySequence::Open);
fileMenu->addAction(tr("E&xit"), this, SLOT(close()),
- QKeySequence(tr("Ctrl+Q")));
+ QKeySequence::Quit);
model = new DomModel(QDomDocument(), this);
view = new QTreeView(this);
diff --git a/examples/linguist/arrowpad/mainwindow.cpp b/examples/linguist/arrowpad/mainwindow.cpp
index a167cc2a37..37b9362a23 100644
--- a/examples/linguist/arrowpad/mainwindow.cpp
+++ b/examples/linguist/arrowpad/mainwindow.cpp
@@ -53,7 +53,7 @@ MainWindow::MainWindow()
//! [1]
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
//! [1]
diff --git a/examples/mainwindows/application/mainwindow.cpp b/examples/mainwindows/application/mainwindow.cpp
index 9a22254ccc..cf36332b40 100644
--- a/examples/mainwindows/application/mainwindow.cpp
+++ b/examples/mainwindows/application/mainwindow.cpp
@@ -174,7 +174,7 @@ void MainWindow::createActions()
//! [20]
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
//! [20]
exitAct->setStatusTip(tr("Exit the application"));
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
diff --git a/examples/mainwindows/dockwidgets/mainwindow.cpp b/examples/mainwindows/dockwidgets/mainwindow.cpp
index 16830348b5..4ccd2f1578 100644
--- a/examples/mainwindows/dockwidgets/mainwindow.cpp
+++ b/examples/mainwindows/dockwidgets/mainwindow.cpp
@@ -242,7 +242,7 @@ void MainWindow::createActions()
connect(undoAct, SIGNAL(triggered()), this, SLOT(undo()));
quitAct = new QAction(tr("&Quit"), this);
- quitAct->setShortcut(tr("Ctrl+Q"));
+ quitAct->setShortcuts(QKeySequence::Quit);
quitAct->setStatusTip(tr("Quit the application"));
connect(quitAct, SIGNAL(triggered()), this, SLOT(close()));
diff --git a/examples/mainwindows/mdi/mainwindow.cpp b/examples/mainwindows/mdi/mainwindow.cpp
index 49f9b21449..e6e3e6eae9 100644
--- a/examples/mainwindows/mdi/mainwindow.cpp
+++ b/examples/mainwindows/mdi/mainwindow.cpp
@@ -235,7 +235,7 @@ void MainWindow::createActions()
//! [0]
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
exitAct->setStatusTip(tr("Exit the application"));
connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));
//! [0]
diff --git a/examples/mainwindows/menus/mainwindow.cpp b/examples/mainwindows/menus/mainwindow.cpp
index 4c10f7358b..08a3c319f8 100644
--- a/examples/mainwindows/menus/mainwindow.cpp
+++ b/examples/mainwindows/menus/mainwindow.cpp
@@ -219,7 +219,7 @@ void MainWindow::createActions()
connect(printAct, SIGNAL(triggered()), this, SLOT(print()));
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
exitAct->setStatusTip(tr("Exit the application"));
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
@@ -240,7 +240,7 @@ void MainWindow::createActions()
connect(cutAct, SIGNAL(triggered()), this, SLOT(cut()));
copyAct = new QAction(tr("&Copy"), this);
- copyAct->setShortcut(tr("Ctrl+C"));
+ copyAct->setShortcuts(QKeySequence::Copy);
copyAct->setStatusTip(tr("Copy the current selection's contents to the "
"clipboard"));
connect(copyAct, SIGNAL(triggered()), this, SLOT(copy()));
@@ -253,7 +253,7 @@ void MainWindow::createActions()
boldAct = new QAction(tr("&Bold"), this);
boldAct->setCheckable(true);
- boldAct->setShortcut(tr("Ctrl+B"));
+ boldAct->setShortcut(QKeySequence::Bold);
boldAct->setStatusTip(tr("Make the text bold"));
connect(boldAct, SIGNAL(triggered()), this, SLOT(bold()));
@@ -263,7 +263,7 @@ void MainWindow::createActions()
italicAct = new QAction(tr("&Italic"), this);
italicAct->setCheckable(true);
- italicAct->setShortcut(tr("Ctrl+I"));
+ italicAct->setShortcut(QKeySequence::Italic);
italicAct->setStatusTip(tr("Make the text italic"));
connect(italicAct, SIGNAL(triggered()), this, SLOT(italic()));
diff --git a/examples/mainwindows/recentfiles/mainwindow.cpp b/examples/mainwindows/recentfiles/mainwindow.cpp
index c8c2f88db3..5746863724 100644
--- a/examples/mainwindows/recentfiles/mainwindow.cpp
+++ b/examples/mainwindows/recentfiles/mainwindow.cpp
@@ -132,7 +132,7 @@ void MainWindow::createActions()
}
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
exitAct->setStatusTip(tr("Exit the application"));
connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));
diff --git a/examples/mainwindows/sdi/mainwindow.cpp b/examples/mainwindows/sdi/mainwindow.cpp
index 61d63b32ff..e7e05eea90 100644
--- a/examples/mainwindows/sdi/mainwindow.cpp
+++ b/examples/mainwindows/sdi/mainwindow.cpp
@@ -180,7 +180,7 @@ void MainWindow::createActions()
connect(closeAct, SIGNAL(triggered()), this, SLOT(close()));
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
exitAct->setStatusTip(tr("Exit the application"));
connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));
diff --git a/examples/opengl/grabber/mainwindow.cpp b/examples/opengl/grabber/mainwindow.cpp
index 7e878f9677..9e2702361f 100644
--- a/examples/opengl/grabber/mainwindow.cpp
+++ b/examples/opengl/grabber/mainwindow.cpp
@@ -136,7 +136,7 @@ void MainWindow::createActions()
connect(clearPixmapAct, SIGNAL(triggered()), this, SLOT(clearPixmap()));
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
aboutAct = new QAction(tr("&About"), this);
diff --git a/examples/painting/svgviewer/mainwindow.cpp b/examples/painting/svgviewer/mainwindow.cpp
index 22393eb723..64f35ed834 100644
--- a/examples/painting/svgviewer/mainwindow.cpp
+++ b/examples/painting/svgviewer/mainwindow.cpp
@@ -53,7 +53,7 @@ MainWindow::MainWindow()
QAction *openAction = fileMenu->addAction(tr("&Open..."));
openAction->setShortcut(QKeySequence(tr("Ctrl+O")));
QAction *quitAction = fileMenu->addAction(tr("E&xit"));
- quitAction->setShortcut(QKeySequence(tr("Ctrl+Q")));
+ quitAction->setShortcuts(QKeySequence::Quit);
menuBar()->addMenu(fileMenu);
diff --git a/examples/phonon/musicplayer/mainwindow.cpp b/examples/phonon/musicplayer/mainwindow.cpp
index f50a2bddc4..30c6d05658 100644
--- a/examples/phonon/musicplayer/mainwindow.cpp
+++ b/examples/phonon/musicplayer/mainwindow.cpp
@@ -261,7 +261,7 @@ void MainWindow::setupActions()
addFilesAction = new QAction(tr("Add &Files"), this);
addFilesAction->setShortcut(tr("Ctrl+F"));
exitAction = new QAction(tr("E&xit"), this);
- exitAction->setShortcut(tr("Ctrl+X"));
+ exitAction->setShortcuts(QKeySequence::Quit);
aboutAction = new QAction(tr("A&bout"), this);
aboutAction->setShortcut(tr("Ctrl+B"));
aboutQtAction = new QAction(tr("About &Qt"), this);
diff --git a/examples/richtext/orderform/mainwindow.cpp b/examples/richtext/orderform/mainwindow.cpp
index e5cffe35a9..7e460b73f9 100644
--- a/examples/richtext/orderform/mainwindow.cpp
+++ b/examples/richtext/orderform/mainwindow.cpp
@@ -49,12 +49,12 @@ MainWindow::MainWindow()
{
QMenu *fileMenu = new QMenu(tr("&File"), this);
QAction *newAction = fileMenu->addAction(tr("&New..."));
- newAction->setShortcut(tr("Ctrl+N"));
+ newAction->setShortcuts(QKeySequence::New);
printAction = fileMenu->addAction(tr("&Print..."), this, SLOT(printFile()));
- printAction->setShortcut(tr("Ctrl+P"));
+ printAction->setShortcuts(QKeySequence::Print);
printAction->setEnabled(false);
QAction *quitAction = fileMenu->addAction(tr("E&xit"));
- quitAction->setShortcut(tr("Ctrl+Q"));
+ quitAction->setShortcuts(QKeySequence::Quit);
menuBar()->addMenu(fileMenu);
letters = new QTabWidget;
diff --git a/examples/richtext/syntaxhighlighter/mainwindow.cpp b/examples/richtext/syntaxhighlighter/mainwindow.cpp
index a6312f9a14..0d1b41f914 100644
--- a/examples/richtext/syntaxhighlighter/mainwindow.cpp
+++ b/examples/richtext/syntaxhighlighter/mainwindow.cpp
@@ -110,14 +110,13 @@ void MainWindow::setupFileMenu()
menuBar()->addMenu(fileMenu);
fileMenu->addAction(tr("&New"), this, SLOT(newFile()),
- QKeySequence(tr("Ctrl+N",
- "File|New")));
+ QKeySequence::New);
+
fileMenu->addAction(tr("&Open..."), this, SLOT(openFile()),
- QKeySequence(tr("Ctrl+O",
- "File|Open")));
+ QKeySequence::Open);
+
fileMenu->addAction(tr("E&xit"), qApp, SLOT(quit()),
- QKeySequence(tr("Ctrl+Q",
- "File|Exit")));
+ QKeySequence::Quit);
}
void MainWindow::setupHelpMenu()
diff --git a/examples/sql/masterdetail/mainwindow.cpp b/examples/sql/masterdetail/mainwindow.cpp
index 67825d6149..5bf4cb9fb1 100644
--- a/examples/sql/masterdetail/mainwindow.cpp
+++ b/examples/sql/masterdetail/mainwindow.cpp
@@ -362,7 +362,7 @@ void MainWindow::createMenuBar()
addAction->setShortcut(tr("Ctrl+A"));
deleteAction->setShortcut(tr("Ctrl+D"));
- quitAction->setShortcut(tr("Ctrl+Q"));
+ quitAction->setShortcuts(QKeySequence::Quit);
QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
fileMenu->addAction(addAction);
diff --git a/examples/tools/codecs/mainwindow.cpp b/examples/tools/codecs/mainwindow.cpp
index 1e6fa69546..5d3b7acb54 100644
--- a/examples/tools/codecs/mainwindow.cpp
+++ b/examples/tools/codecs/mainwindow.cpp
@@ -156,7 +156,7 @@ void MainWindow::findCodecs()
void MainWindow::createActions()
{
openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcut(tr("Ctrl+O"));
+ openAct->setShortcuts(QKeySequence::Open);
connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
foreach (QTextCodec *codec, codecs) {
@@ -169,7 +169,7 @@ void MainWindow::createActions()
}
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
aboutAct = new QAction(tr("&About"), this);
diff --git a/examples/tools/plugandpaint/mainwindow.cpp b/examples/tools/plugandpaint/mainwindow.cpp
index 224bc71e04..f61359b92e 100644
--- a/examples/tools/plugandpaint/mainwindow.cpp
+++ b/examples/tools/plugandpaint/mainwindow.cpp
@@ -179,15 +179,15 @@ void MainWindow::aboutPlugins()
void MainWindow::createActions()
{
openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcut(tr("Ctrl+O"));
+ openAct->setShortcuts(QKeySequence::Open);
connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
saveAsAct = new QAction(tr("&Save As..."), this);
- saveAsAct->setShortcut(tr("Ctrl+S"));
+ saveAsAct->setShortcuts(QKeySequence::SaveAs);
connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
brushColorAct = new QAction(tr("&Brush Color..."), this);
diff --git a/examples/tools/settingseditor/mainwindow.cpp b/examples/tools/settingseditor/mainwindow.cpp
index 0f48a5c390..0321b55650 100644
--- a/examples/tools/settingseditor/mainwindow.cpp
+++ b/examples/tools/settingseditor/mainwindow.cpp
@@ -122,7 +122,7 @@ void MainWindow::about()
void MainWindow::createActions()
{
openSettingsAct = new QAction(tr("&Open Application Settings..."), this);
- openSettingsAct->setShortcut(tr("Ctrl+O"));
+ openSettingsAct->setShortcuts(QKeySequence::Open);
connect(openSettingsAct, SIGNAL(triggered()), this, SLOT(openSettings()));
openIniFileAct = new QAction(tr("Open I&NI File..."), this);
@@ -146,7 +146,7 @@ void MainWindow::createActions()
connect(refreshAct, SIGNAL(triggered()), settingsTree, SLOT(refresh()));
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
autoRefreshAct = new QAction(tr("&Auto-Refresh"), this);
diff --git a/examples/tools/undoframework/mainwindow.cpp b/examples/tools/undoframework/mainwindow.cpp
index f912ff2bba..bf0aa41fe3 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);
diff --git a/examples/webkit/formextractor/mainwindow.cpp b/examples/webkit/formextractor/mainwindow.cpp
index 222d9b208d..ec4d0434a1 100644
--- a/examples/webkit/formextractor/mainwindow.cpp
+++ b/examples/webkit/formextractor/mainwindow.cpp
@@ -54,7 +54,7 @@ void MainWindow::createActions()
{
exitAct = new QAction(tr("E&xit"), this);
exitAct->setStatusTip(tr("Exit the application"));
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
aboutAct = new QAction(tr("&About"), this);
diff --git a/examples/webkit/previewer/mainwindow.cpp b/examples/webkit/previewer/mainwindow.cpp
index abe7941f03..1e20ed35c4 100644
--- a/examples/webkit/previewer/mainwindow.cpp
+++ b/examples/webkit/previewer/mainwindow.cpp
@@ -61,7 +61,7 @@ MainWindow::MainWindow()
void MainWindow::createActions()
{
openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcut(tr("Ctrl+O"));
+ openAct->setShortcuts(QKeySequence::Open);
openAct->setStatusTip(tr("Open an existing HTML file"));
connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
@@ -72,13 +72,13 @@ void MainWindow::createActions()
//! [1]
saveAct = new QAction(tr("&Save"), this);
- saveAct->setShortcut(tr("Ctrl+S"));
+ saveAct->setShortcuts(QKeySequence::Save);
saveAct->setStatusTip(tr("Save the HTML file to disk"));
connect(saveAct, SIGNAL(triggered()), this, SLOT(save()));
exitAct = new QAction(tr("E&xit"), this);
exitAct->setStatusTip(tr("Exit the application"));
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
aboutAct = new QAction(tr("&About"), this);
diff --git a/examples/widgets/icons/mainwindow.cpp b/examples/widgets/icons/mainwindow.cpp
index 00ce8b01e7..db42710848 100644
--- a/examples/widgets/icons/mainwindow.cpp
+++ b/examples/widgets/icons/mainwindow.cpp
@@ -369,7 +369,7 @@ void MainWindow::createActions()
this, SLOT(removeAllImages()));
exitAct = new QAction(tr("&Quit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
styleActionGroup = new QActionGroup(this);
diff --git a/examples/widgets/scribble/mainwindow.cpp b/examples/widgets/scribble/mainwindow.cpp
index ad1a837b7e..c4b05fe67b 100644
--- a/examples/widgets/scribble/mainwindow.cpp
+++ b/examples/widgets/scribble/mainwindow.cpp
@@ -141,7 +141,7 @@ void MainWindow::createActions()
//! [13] //! [14]
{
openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcut(tr("Ctrl+O"));
+ openAct->setShortcuts(QKeySequence::Open);
connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
foreach (QByteArray format, QImageWriter::supportedImageFormats()) {
@@ -157,7 +157,7 @@ void MainWindow::createActions()
connect(printAct, SIGNAL(triggered()), scribbleArea, SLOT(print()));
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
penColorAct = new QAction(tr("&Pen Color..."), this);
diff --git a/examples/widgets/tablet/mainwindow.cpp b/examples/widgets/tablet/mainwindow.cpp
index 56a10cd769..10490bf6c2 100644
--- a/examples/widgets/tablet/mainwindow.cpp
+++ b/examples/widgets/tablet/mainwindow.cpp
@@ -212,17 +212,17 @@ void MainWindow::createActions()
this, SLOT(lineWidthActionTriggered(QAction *)));
exitAction = new QAction(tr("E&xit"), this);
- exitAction->setShortcut(tr("Ctrl+X"));
+ exitAction->setShortcuts(QKeySequence::Quit);
connect(exitAction, SIGNAL(triggered()),
this, SLOT(close()));
loadAction = new QAction(tr("&Open..."), this);
- loadAction->setShortcut(tr("Ctrl+O"));
+ loadAction->setShortcuts(QKeySequence::Open);
connect(loadAction, SIGNAL(triggered()),
this, SLOT(loadAct()));
saveAction = new QAction(tr("&Save As..."), this);
- saveAction->setShortcut(tr("Ctrl+S"));
+ saveAction->setShortcuts(QKeySequence::SaveAs);
connect(saveAction, SIGNAL(triggered()),
this, SLOT(saveAct()));
diff --git a/examples/xml/dombookmarks/mainwindow.cpp b/examples/xml/dombookmarks/mainwindow.cpp
index 6b0c1010da..7efe6fffc5 100644
--- a/examples/xml/dombookmarks/mainwindow.cpp
+++ b/examples/xml/dombookmarks/mainwindow.cpp
@@ -113,15 +113,15 @@ void MainWindow::about()
void MainWindow::createActions()
{
openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcut(tr("Ctrl+O"));
+ openAct->setShortcuts(QKeySequence::Open);
connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
saveAsAct = new QAction(tr("&Save As..."), this);
- saveAsAct->setShortcut(tr("Ctrl+S"));
+ saveAsAct->setShortcuts(QKeySequence::SaveAs);
connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
aboutAct = new QAction(tr("&About"), this);
diff --git a/examples/xml/saxbookmarks/mainwindow.cpp b/examples/xml/saxbookmarks/mainwindow.cpp
index 2cba5590ea..9247eb7354 100644
--- a/examples/xml/saxbookmarks/mainwindow.cpp
+++ b/examples/xml/saxbookmarks/mainwindow.cpp
@@ -128,15 +128,15 @@ void MainWindow::about()
void MainWindow::createActions()
{
openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcut(tr("Ctrl+O"));
+ openAct->setShortcuts(QKeySequence::Open);
connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
saveAsAct = new QAction(tr("&Save As..."), this);
- saveAsAct->setShortcut(tr("Ctrl+S"));
+ saveAsAct->setShortcuts(QKeySequence::SaveAs);
connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
aboutAct = new QAction(tr("&About"), this);
diff --git a/examples/xml/streambookmarks/mainwindow.cpp b/examples/xml/streambookmarks/mainwindow.cpp
index 2136b4bc9c..c6f991b866 100644
--- a/examples/xml/streambookmarks/mainwindow.cpp
+++ b/examples/xml/streambookmarks/mainwindow.cpp
@@ -141,15 +141,15 @@ void MainWindow::about()
void MainWindow::createActions()
{
openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcut(tr("Ctrl+O"));
+ openAct->setShortcuts(QKeySequence::Open);
connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
saveAsAct = new QAction(tr("&Save As..."), this);
- saveAsAct->setShortcut(tr("Ctrl+S"));
+ saveAsAct->setShortcuts(QKeySequence::SaveAs);
connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
aboutAct = new QAction(tr("&About"), this);
diff --git a/examples/xmlpatterns/trafficinfo/mainwindow.cpp b/examples/xmlpatterns/trafficinfo/mainwindow.cpp
index 1f754d5a39..393e33c717 100644
--- a/examples/xmlpatterns/trafficinfo/mainwindow.cpp
+++ b/examples/xmlpatterns/trafficinfo/mainwindow.cpp
@@ -55,7 +55,7 @@ MainWindow::MainWindow()
: QWidget(0, Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint)
{
QAction *quitAction = new QAction(tr("E&xit"), this);
- quitAction->setShortcut(tr("Ctrl+Q"));
+ quitAction->setShortcuts(QKeySequence::Quit);
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
QAction *configAction = new QAction(tr("&Select station..."), this);
diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp
index b0c2c6b002..cb10e3f576 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -412,7 +412,7 @@ void MainWindow::setupActions()
m_closeTabAction->setShortcuts(QKeySequence::Close);
QAction *tmp = menu->addAction(tr("&Quit"), this, SLOT(close()));
- tmp->setShortcut(tr("CTRL+Q"));
+ tmp->setShortcut(QKeySequence::Quit);
tmp->setMenuRole(QAction::QuitRole);
menu = menuBar()->addMenu(tr("&Edit"));
diff --git a/tools/designer/src/designer/qdesigner_actions.cpp b/tools/designer/src/designer/qdesigner_actions.cpp
index 65e5937e23..d5d01f430e 100644
--- a/tools/designer/src/designer/qdesigner_actions.cpp
+++ b/tools/designer/src/designer/qdesigner_actions.cpp
@@ -280,7 +280,7 @@ QDesignerActions::QDesignerActions(QDesignerWorkbench *workbench)
m_fileActions->addAction(createSeparator(this));
- m_quitAction->setShortcut(tr("CTRL+Q"));
+ m_quitAction->setShortcuts(QKeySequence::Quit);
m_quitAction->setMenuRole(QAction::QuitRole);
connect(m_quitAction, SIGNAL(triggered()), this, SLOT(shutdown()));
m_fileActions->addAction(m_quitAction);