summaryrefslogtreecommitdiffstats
path: root/examples/widgets/widgets/tablet
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2019-04-16 16:32:08 +0200
committerTobias Hunger <tobias.hunger@qt.io>2019-04-16 16:32:08 +0200
commit6630937e63ae5797487b86743a7733c8ae5cc42c (patch)
tree3d53dacf6430f9099e1fb20835881205de674961 /examples/widgets/widgets/tablet
parent37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff)
parentc7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff)
Merge commit 'dev' into 'wip/cmake-merge'
Diffstat (limited to 'examples/widgets/widgets/tablet')
-rw-r--r--examples/widgets/widgets/tablet/tabletapplication.cpp4
-rw-r--r--examples/widgets/widgets/tablet/tabletapplication.h5
-rw-r--r--examples/widgets/widgets/tablet/tabletcanvas.cpp2
3 files changed, 5 insertions, 6 deletions
diff --git a/examples/widgets/widgets/tablet/tabletapplication.cpp b/examples/widgets/widgets/tablet/tabletapplication.cpp
index 2e5ac07c95..37be018276 100644
--- a/examples/widgets/widgets/tablet/tabletapplication.cpp
+++ b/examples/widgets/widgets/tablet/tabletapplication.cpp
@@ -48,10 +48,10 @@
**
****************************************************************************/
-#include <QtWidgets>
-
#include "tabletapplication.h"
+#include <QtWidgets>
+
//! [0]
bool TabletApplication::event(QEvent *event)
{
diff --git a/examples/widgets/widgets/tablet/tabletapplication.h b/examples/widgets/widgets/tablet/tabletapplication.h
index 6b3b2a1730..9b4a4f1886 100644
--- a/examples/widgets/widgets/tablet/tabletapplication.h
+++ b/examples/widgets/widgets/tablet/tabletapplication.h
@@ -61,15 +61,14 @@ class TabletApplication : public QApplication
Q_OBJECT
public:
- TabletApplication(int &argv, char **args)
- : QApplication(argv, args) {}
+ using QApplication::QApplication;
bool event(QEvent *event) override;
void setCanvas(TabletCanvas *canvas)
{ m_canvas = canvas; }
private:
- TabletCanvas *m_canvas;
+ TabletCanvas *m_canvas = nullptr;
};
//! [0]
diff --git a/examples/widgets/widgets/tablet/tabletcanvas.cpp b/examples/widgets/widgets/tablet/tabletcanvas.cpp
index bfcc84e182..dc56702142 100644
--- a/examples/widgets/widgets/tablet/tabletcanvas.cpp
+++ b/examples/widgets/widgets/tablet/tabletcanvas.cpp
@@ -224,7 +224,7 @@ void TabletCanvas::paintPixmap(QPainter &painter, QTabletEvent *event)
qWarning() << error;
#endif
}
- // FALL-THROUGH
+ Q_FALLTHROUGH();
case QTabletEvent::Stylus:
painter.setPen(m_pen);
painter.drawLine(lastPoint.pos, event->posF());