summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2010-02-01 06:34:29 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2010-02-01 06:56:50 (GMT)
commit394b7ae6421afb0e309b6207fa2b1fce2e44426e (patch)
tree1b978136d45f813288ede835fdcdeb008b34cadf /src/script
parentdc1cab966938edc5463f26189607ece134549a22 (diff)
parent26af4d54ea4f3a48d053038f34a00aa1119a585b (diff)
downloadQt-394b7ae6421afb0e309b6207fa2b1fce2e44426e.zip
Qt-394b7ae6421afb0e309b6207fa2b1fce2e44426e.tar.gz
Qt-394b7ae6421afb0e309b6207fa2b1fce2e44426e.tar.bz2
Merge commit 'origin/4.6' into oslo1-master
Conflicts: src/gui/kernel/qeventdispatcher_mac.mm src/gui/kernel/qt_cocoa_helpers_mac.mm src/gui/widgets/qmenu_mac.mm tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp tools/assistant/tools/assistant/centralwidget.cpp tools/linguist/lupdate/main.cpp
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/qscriptvalue.cpp13
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;
}