diff options
Diffstat (limited to 'examples/widgets/richtext/syntaxhighlighter/mainwindow.cpp')
-rw-r--r-- | examples/widgets/richtext/syntaxhighlighter/mainwindow.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/examples/widgets/richtext/syntaxhighlighter/mainwindow.cpp b/examples/widgets/richtext/syntaxhighlighter/mainwindow.cpp index e8e5015f7b..6c30121e43 100644 --- a/examples/widgets/richtext/syntaxhighlighter/mainwindow.cpp +++ b/examples/widgets/richtext/syntaxhighlighter/mainwindow.cpp @@ -74,8 +74,7 @@ void MainWindow::openFile(const QString &path) QString fileName = path; if (fileName.isNull()) - fileName = QFileDialog::getOpenFileName(this, - tr("Open File"), "", "C++ Files (*.cpp *.h)"); + fileName = QFileDialog::getOpenFileName(this, tr("Open File"), "", "C++ Files (*.cpp *.h)"); if (!fileName.isEmpty()) { QFile file(fileName); @@ -108,14 +107,9 @@ void MainWindow::setupFileMenu() QMenu *fileMenu = new QMenu(tr("&File"), this); menuBar()->addMenu(fileMenu); - fileMenu->addAction(tr("&New"), this, SLOT(newFile()), - QKeySequence::New); - - fileMenu->addAction(tr("&Open..."), this, SLOT(openFile()), - QKeySequence::Open); - - fileMenu->addAction(tr("E&xit"), qApp, SLOT(quit()), - QKeySequence::Quit); + fileMenu->addAction(tr("&New"), this, SLOT(newFile()), QKeySequence::New); + fileMenu->addAction(tr("&Open..."), this, SLOT(openFile()), QKeySequence::Open); + fileMenu->addAction(tr("E&xit"), qApp, SLOT(quit()), QKeySequence::Quit); } void MainWindow::setupHelpMenu() |