From 58e2b9c01b31cef8a0fa263de3d984c22f1d7ca7 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Sat, 15 Sep 2012 13:46:14 +0200 Subject: 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 Reviewed-by: Thiago Macieira --- examples/widgets/layouts/flowlayout/flowlayout.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/widgets/layouts/flowlayout/flowlayout.h') diff --git a/examples/widgets/layouts/flowlayout/flowlayout.h b/examples/widgets/layouts/flowlayout/flowlayout.h index 2a27f93772..2b98f000f1 100644 --- a/examples/widgets/layouts/flowlayout/flowlayout.h +++ b/examples/widgets/layouts/flowlayout/flowlayout.h @@ -48,8 +48,8 @@ class FlowLayout : public QLayout { public: - FlowLayout(QWidget *parent, int margin = -1, int hSpacing = -1, int vSpacing = -1); - FlowLayout(int margin = -1, int hSpacing = -1, int vSpacing = -1); + explicit FlowLayout(QWidget *parent, int margin = -1, int hSpacing = -1, int vSpacing = -1); + explicit FlowLayout(int margin = -1, int hSpacing = -1, int vSpacing = -1); ~FlowLayout(); void addItem(QLayoutItem *item); -- cgit v1.2.3