summaryrefslogtreecommitdiffstats
path: root/src/script/qscriptengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/qscriptengine.cpp')
-rw-r--r--src/script/qscriptengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/qscriptengine.cpp b/src/script/qscriptengine.cpp
index d8908ed..97021fc 100644
--- a/src/script/qscriptengine.cpp
+++ b/src/script/qscriptengine.cpp
@@ -587,7 +587,7 @@ QScriptValue QScriptEngine::newQObject(const QScriptValue &scriptObject,
QScriptValuePrivate *p = QScriptValuePrivate::get(scriptObject);
if (!p || !p->value.isObject())
return newQObject(qtObject, ownership, options);
- if (p->value.isVariant()) {
+ if (p->value.isQObject()) {
QScript::ExtQObject::Instance *data;
data = d->qobjectConstructor->get(p->value);
Q_ASSERT(data != 0);