summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptvalue.h
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-07-06 14:57:06 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-07-06 14:57:06 (GMT)
commit292f72349a9ff74320f29b12f725bad6c8c283c4 (patch)
tree4511cf525ccc0385cf430a42729e35a1adfdd09f /src/script/api/qscriptvalue.h
parent9769235a26c3bacc597b994fa249516721833389 (diff)
downloadQt-292f72349a9ff74320f29b12f725bad6c8c283c4.zip
Qt-292f72349a9ff74320f29b12f725bad6c8c283c4.tar.gz
Qt-292f72349a9ff74320f29b12f725bad6c8c283c4.tar.bz2
fix QScriptValue::construct() when argument is not array-like
Diffstat (limited to 'src/script/api/qscriptvalue.h')
-rw-r--r--src/script/api/qscriptvalue.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/script/api/qscriptvalue.h b/src/script/api/qscriptvalue.h
index 34b4ec3..15a11e3 100644
--- a/src/script/api/qscriptvalue.h
+++ b/src/script/api/qscriptvalue.h
@@ -215,6 +215,12 @@ public:
qint64 objectId() const;
private:
+ // force compile error, prevent QScriptValue(bool) to be called
+ inline QScriptValue(void *) { Q_ASSERT(false); }
+ // force compile error, prevent QScriptValue(QScriptEngine*, bool) to be called
+ inline QScriptValue(QScriptEngine *, void *) { Q_ASSERT(false); }
+
+private:
QScriptValuePrivate *d_ptr;
Q_DECLARE_PRIVATE(QScriptValue)