diff options
author | David Schulz <david.schulz@digia.com> | 2012-11-23 14:27:50 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-25 01:34:07 +0100 |
commit | 4ac521354dfa575c31ecb732a0f8c1e18827c21e (patch) | |
tree | 20833a59d0c291c582332c4cc0f7e724d1c9b996 /examples/widgets/draganddrop/puzzle/mainwindow.cpp | |
parent | d5ec06be6397b807b743aa46707ff45aa9dccafa (diff) | |
download | qtbase-4ac521354dfa575c31ecb732a0f8c1e18827c21e.tar.gz |
QtBase: example code style
Change-Id: I0685f7e2c7c698a4bf288b8b1ae909167932a3fb
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'examples/widgets/draganddrop/puzzle/mainwindow.cpp')
-rw-r--r-- | examples/widgets/draganddrop/puzzle/mainwindow.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/examples/widgets/draganddrop/puzzle/mainwindow.cpp b/examples/widgets/draganddrop/puzzle/mainwindow.cpp index 47300f3f28..bc0f4d6838 100644 --- a/examples/widgets/draganddrop/puzzle/mainwindow.cpp +++ b/examples/widgets/draganddrop/puzzle/mainwindow.cpp @@ -38,13 +38,13 @@ ** ****************************************************************************/ -#include <QtWidgets> -#include <stdlib.h> - #include "mainwindow.h" #include "pieceslist.h" #include "puzzlewidget.h" +#include <QtWidgets> +#include <stdlib.h> + MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { @@ -59,9 +59,10 @@ void MainWindow::openImage(const QString &path) { QString fileName = path; - if (fileName.isNull()) + if (fileName.isNull()) { fileName = QFileDialog::getOpenFileName(this, tr("Open Image"), "", "Image Files (*.png *.jpg *.bmp)"); + } if (!fileName.isEmpty()) { QPixmap newImage; @@ -79,9 +80,9 @@ void MainWindow::openImage(const QString &path) void MainWindow::setCompleted() { QMessageBox::information(this, tr("Puzzle Completed"), - tr("Congratulations! You have completed the puzzle!\n" - "Click OK to start again."), - QMessageBox::Ok); + tr("Congratulations! You have completed the puzzle!\n" + "Click OK to start again."), + QMessageBox::Ok); setupPuzzle(); } |