From a14a943f9ac3d1e85514d7fb6688c84e624ac850 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Fri, 11 May 2018 16:31:51 +0200 Subject: 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 Reviewed-by: Paul Wicking Reviewed-by: Richard Moe Gustavsen --- examples/widgets/tools/plugandpaint/app/paintarea.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'examples/widgets/tools/plugandpaint/app/paintarea.cpp') 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 #include +#include 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); -- cgit v1.2.3