diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-02-02 02:41:42 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-02-02 02:41:42 (GMT) |
commit | 662666a5d4d114f91dbed8cbe3ce46fddfe3c82b (patch) | |
tree | 0b72d67d46bf1693e1b3e2b8669fef8c8c89e766 /src/script | |
parent | 35a211cd95e0d09ef0b547b57f01f0a9ff41da2f (diff) | |
parent | 64ca7030df6189a0bc4df36473befd868c8d2ef6 (diff) | |
download | Qt-662666a5d4d114f91dbed8cbe3ce46fddfe3c82b.zip Qt-662666a5d4d114f91dbed8cbe3ce46fddfe3c82b.tar.gz Qt-662666a5d4d114f91dbed8cbe3ce46fddfe3c82b.tar.bz2 |
Merge branch '4.6' of git://scm.dev.nokia.troll.no/qt/qt into kinetic-declarativeui
Conflicts:
tools/linguist/lupdate/main.cpp
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/api/qscriptvalue.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 1db2e1b..5bfe46a 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -1148,10 +1148,15 @@ bool QScriptValue::strictlyEquals(const QScriptValue &other) const } if (d->type != other.d_ptr->type) { - if (d->type == QScriptValuePrivate::JavaScriptCore) - return JSC::JSValue::strictEqual(d->jscValue, d->engine->scriptValueToJSCValue(other)); - else if (other.d_ptr->type == QScriptValuePrivate::JavaScriptCore) - return JSC::JSValue::strictEqual(other.d_ptr->engine->scriptValueToJSCValue(*this), other.d_ptr->jscValue); + if (d->type == QScriptValuePrivate::JavaScriptCore) { + QScriptEnginePrivate *eng_p = d->engine ? d->engine : other.d_ptr->engine; + if (eng_p) + return JSC::JSValue::strictEqual(d->jscValue, eng_p->scriptValueToJSCValue(other)); + } else if (other.d_ptr->type == QScriptValuePrivate::JavaScriptCore) { + QScriptEnginePrivate *eng_p = other.d_ptr->engine ? other.d_ptr->engine : d->engine; + if (eng_p) + return JSC::JSValue::strictEqual(eng_p->scriptValueToJSCValue(*this), other.d_ptr->jscValue); + } return false; } |