From aecb4af947acd5e5c4a59641512269348ca97f07 Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Tue, 12 May 2009 13:03:20 +0200 Subject: Replace all instances of "Ctrl+Q" with QKeySequence::Quit. We introduce this new enum, we should be using it. --- examples/richtext/orderform/mainwindow.cpp | 6 +++--- examples/richtext/syntaxhighlighter/mainwindow.cpp | 11 +++++------ 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'examples/richtext') 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() -- cgit v1.2.3