summaryrefslogtreecommitdiffstats
path: root/examples/mainwindows
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/mainwindows
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/mainwindows')
-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
6 files changed, 9 insertions, 9 deletions
diff --git a/examples/mainwindows/application/mainwindow.cpp b/examples/mainwindows/application/mainwindow.cpp
index 9a22254..cf36332 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 1683034..4ccd2f1 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 49f9b21..e6e3e6e 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 4c10f73..08a3c31 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 c8c2f88..5746863 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 61d63b3..e7e05ee 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()));