summaryrefslogtreecommitdiffstats
path: root/examples/widgets/tools/plugandpaint/app/paintarea.cpp
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2018-05-11 16:31:51 +0200
committerAndré Hartmann <aha_1980@gmx.de>2018-06-06 11:55:44 +0000
commita14a943f9ac3d1e85514d7fb6688c84e624ac850 (patch)
tree8da635836270c52a9289975bbf4eaa545f509398 /examples/widgets/tools/plugandpaint/app/paintarea.cpp
parent62abbe34b84a1c224d27f3eb2f735749f5f24b4f (diff)
Examples: Cleanup and modernize Plug&Paint
* Use C++11 member init * Use auto where appropriate * Replace foreach with range-for * Replace last Qt4-style connects * Sort includes to common style * Fix some Clang warnings Task-number: QTBUG-60635 Change-Id: I61c98b34b954e416dd175b56ca589125217083de Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'examples/widgets/tools/plugandpaint/app/paintarea.cpp')
-rw-r--r--examples/widgets/tools/plugandpaint/app/paintarea.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/examples/widgets/tools/plugandpaint/app/paintarea.cpp b/examples/widgets/tools/plugandpaint/app/paintarea.cpp
index 5d2170bfd4..4295e04cc0 100644
--- a/examples/widgets/tools/plugandpaint/app/paintarea.cpp
+++ b/examples/widgets/tools/plugandpaint/app/paintarea.cpp
@@ -52,16 +52,11 @@
#include "interfaces.h"
#include "paintarea.h"
-#include <QPainter>
#include <QMouseEvent>
+#include <QPainter>
PaintArea::PaintArea(QWidget *parent) :
- QWidget(parent),
- theImage(500, 400, QImage::Format_RGB32),
- color(Qt::blue),
- thickness(3),
- brushInterface(0),
- lastPos(-1, -1)
+ QWidget(parent)
{
setAttribute(Qt::WA_StaticContents);
setAttribute(Qt::WA_NoBackground);