diff options
Diffstat (limited to 'examples/widgets/widgets/tablet')
-rw-r--r-- | examples/widgets/widgets/tablet/tabletapplication.cpp | 4 | ||||
-rw-r--r-- | examples/widgets/widgets/tablet/tabletapplication.h | 5 | ||||
-rw-r--r-- | examples/widgets/widgets/tablet/tabletcanvas.cpp | 2 |
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()); |