Mark QMetaType constructor as explicit.
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>
Mon, 5 Mar 2012 14:27:40 +0000 (15:27 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 6 Mar 2012 05:34:40 +0000 (06:34 +0100)
Implicit conversion from an int would look strange in this case.

Change-Id: I2222a045c293595d7b83a2fb75ca646f5cf79bca
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
src/corelib/kernel/qmetatype.h

index f969875..7f6eaf2 100644 (file)
@@ -255,7 +255,7 @@ public:
     static bool load(QDataStream &stream, int type, void *data);
 #endif
 
-    QMetaType(const int type);
+    explicit QMetaType(const int type);
     inline ~QMetaType();
 
     inline bool isValid() const;