Mark constructor of QJSValue as deletable.
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>
Tue, 31 Jan 2012 09:03:56 +0000 (10:03 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 7 Feb 2012 10:45:56 +0000 (11:45 +0100)
This constructor is there only to force compile time error.

Change-Id: Ia2e059e0c7fa516949a166da8856543a5608d217
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
src/declarative/qml/v8/qjsvalue.cpp
src/declarative/qml/v8/qjsvalue.h

index 8be6a40..e0a925c 100644 (file)
@@ -162,16 +162,6 @@ QJSValue::QJSValue(const char *value)
 #endif
 
 /*!
-    Block automatic convertion to bool
-    \internal
-*/
-QJSValue::QJSValue(void* d)
-{
-    Q_UNUSED(d);
-    Q_ASSERT(false);
-}
-
-/*!
     Constructs a new QJSValue from private
     \internal
 */
index ebb9c8b..bfe0ec0 100644 (file)
@@ -123,7 +123,8 @@ public:
 
 private:
     // force compile error, prevent QJSValue(bool) to be called
-    QJSValue(void *);
+
+    QJSValue(void *) Q_DECL_EQ_DELETE;
 
     QJSValue(QJSValuePrivate*);
     QJSValue(QScriptPassPointer<QJSValuePrivate>);