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/draggableicons | |
parent | d5ec06be6397b807b743aa46707ff45aa9dccafa (diff) |
QtBase: example code style
Change-Id: I0685f7e2c7c698a4bf288b8b1ae909167932a3fb
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'examples/widgets/draganddrop/draggableicons')
3 files changed, 5 insertions, 4 deletions
diff --git a/examples/widgets/draganddrop/draggableicons/dragwidget.cpp b/examples/widgets/draganddrop/draggableicons/dragwidget.cpp index 2422911fac..b9441f8a8a 100644 --- a/examples/widgets/draganddrop/draggableicons/dragwidget.cpp +++ b/examples/widgets/draganddrop/draggableicons/dragwidget.cpp @@ -159,9 +159,9 @@ void DragWidget::mousePressEvent(QMouseEvent *event) child->setPixmap(tempPixmap); - if (drag->exec(Qt::CopyAction | Qt::MoveAction, Qt::CopyAction) == Qt::MoveAction) + if (drag->exec(Qt::CopyAction | Qt::MoveAction, Qt::CopyAction) == Qt::MoveAction) { child->close(); - else { + } else { child->show(); child->setPixmap(pixmap); } diff --git a/examples/widgets/draganddrop/draggableicons/dragwidget.h b/examples/widgets/draganddrop/draggableicons/dragwidget.h index b6154430fe..dcacec8e3d 100644 --- a/examples/widgets/draganddrop/draggableicons/dragwidget.h +++ b/examples/widgets/draganddrop/draggableicons/dragwidget.h @@ -52,7 +52,7 @@ QT_END_NAMESPACE class DragWidget : public QFrame { public: - DragWidget(QWidget *parent=0); + DragWidget(QWidget *parent = 0); protected: void dragEnterEvent(QDragEnterEvent *event); @@ -62,4 +62,4 @@ protected: }; //! [0] -#endif +#endif // DRAGWIDGET_H diff --git a/examples/widgets/draganddrop/draggableicons/main.cpp b/examples/widgets/draganddrop/draggableicons/main.cpp index 6e1110b1f3..03798b8e40 100644 --- a/examples/widgets/draganddrop/draggableicons/main.cpp +++ b/examples/widgets/draganddrop/draggableicons/main.cpp @@ -40,6 +40,7 @@ #include <QApplication> #include <QHBoxLayout> + #include "dragwidget.h" int main(int argc, char *argv[]) |