Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Mark constructor of QJSValue as deletable.
This constructor is there only to force compile time error.

Change-Id: Ia2e059e0c7fa516949a166da8856543a5608d217
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
  • Loading branch information
nierob authored and Qt by Nokia committed Feb 7, 2012
1 parent 5e42176 commit 54a2a4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
10 changes: 0 additions & 10 deletions src/declarative/qml/v8/qjsvalue.cpp
Expand Up @@ -161,16 +161,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
Expand Down
3 changes: 2 additions & 1 deletion src/declarative/qml/v8/qjsvalue.h
Expand Up @@ -123,7 +123,8 @@ class Q_DECLARATIVE_EXPORT QJSValue

private:
// force compile error, prevent QJSValue(bool) to be called
QJSValue(void *);

QJSValue(void *) Q_DECL_EQ_DELETE;

QJSValue(QJSValuePrivate*);
QJSValue(QScriptPassPointer<QJSValuePrivate>);
Expand Down

0 comments on commit 54a2a4e

Please sign in to comment.