diff options
author | Sergio Ahumada <sergio.ahumada@nokia.com> | 2012-09-15 13:46:14 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-17 22:14:25 +0200 |
commit | 58e2b9c01b31cef8a0fa263de3d984c22f1d7ca7 (patch) | |
tree | 4d554a177cd60fee123f88744fad7d5953429618 /examples/widgets/painting | |
parent | 89b12da2efff35915a38d608279cd3a5e7578c35 (diff) |
examples: Mark ctor's as explicit
Make C++ class constructors that can be used with only one
required argument 'explicit' to minimize wrong use of the class.
Change-Id: Ida9f9c2f0c8608c35b0137b2512a6747afd69515
Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'examples/widgets/painting')
-rw-r--r-- | examples/widgets/painting/deform/pathdeform.h | 2 | ||||
-rw-r--r-- | examples/widgets/painting/painterpaths/renderarea.h | 2 | ||||
-rw-r--r-- | examples/widgets/painting/pathstroke/pathstroke.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/widgets/painting/deform/pathdeform.h b/examples/widgets/painting/deform/pathdeform.h index 6f0d647f4e..07f615d31e 100644 --- a/examples/widgets/painting/deform/pathdeform.h +++ b/examples/widgets/painting/deform/pathdeform.h @@ -58,7 +58,7 @@ class PathDeformRenderer : public ArthurFrame Q_PROPERTY(QString text READ text WRITE setText) public: - PathDeformRenderer(QWidget *widget, bool smallScreen = false); + explicit PathDeformRenderer(QWidget *widget, bool smallScreen = false); void paint(QPainter *painter); diff --git a/examples/widgets/painting/painterpaths/renderarea.h b/examples/widgets/painting/painterpaths/renderarea.h index 5c310fdf62..ec6c4ea291 100644 --- a/examples/widgets/painting/painterpaths/renderarea.h +++ b/examples/widgets/painting/painterpaths/renderarea.h @@ -50,7 +50,7 @@ class RenderArea : public QWidget Q_OBJECT public: - RenderArea(const QPainterPath &path, QWidget *parent = 0); + explicit RenderArea(const QPainterPath &path, QWidget *parent = 0); QSize minimumSizeHint() const; QSize sizeHint() const; diff --git a/examples/widgets/painting/pathstroke/pathstroke.h b/examples/widgets/painting/pathstroke/pathstroke.h index 743a757b0a..5e2a1ea579 100644 --- a/examples/widgets/painting/pathstroke/pathstroke.h +++ b/examples/widgets/painting/pathstroke/pathstroke.h @@ -53,7 +53,7 @@ class PathStrokeRenderer : public ArthurFrame public: enum PathMode { CurveMode, LineMode }; - PathStrokeRenderer(QWidget *parent, bool smallScreen = false); + explicit PathStrokeRenderer(QWidget *parent, bool smallScreen = false); void paint(QPainter *); void mousePressEvent(QMouseEvent *e); |