From 54a2a4ee656134874990d5657dfe921d98c6c028 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C4=99drzej=20Nowacki?= Date: Tue, 31 Jan 2012 10:03:56 +0100 Subject: [PATCH] Mark constructor of QJSValue as deletable. This constructor is there only to force compile time error. Change-Id: Ia2e059e0c7fa516949a166da8856543a5608d217 Reviewed-by: Olivier Goffart --- src/declarative/qml/v8/qjsvalue.cpp | 10 ---------- src/declarative/qml/v8/qjsvalue.h | 3 ++- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/declarative/qml/v8/qjsvalue.cpp b/src/declarative/qml/v8/qjsvalue.cpp index 8be6a40..e0a925c 100644 --- a/src/declarative/qml/v8/qjsvalue.cpp +++ b/src/declarative/qml/v8/qjsvalue.cpp @@ -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 */ diff --git a/src/declarative/qml/v8/qjsvalue.h b/src/declarative/qml/v8/qjsvalue.h index ebb9c8b..bfe0ec0 100644 --- a/src/declarative/qml/v8/qjsvalue.h +++ b/src/declarative/qml/v8/qjsvalue.h @@ -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); -- 1.7.2.5