summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptvalue.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-01 13:57:38 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-01 13:57:38 (GMT)
commit5067683704580fcfedef4e68f19acedb133936e8 (patch)
tree9ed5acfa397b093fd726742ae3c478c2f21223bc /src/script/api/qscriptvalue.cpp
parent1b4bb02fcb3da77ddfa6281365ba3210aab9daad (diff)
parent11d2c8f96697adc93ccd82e3db1de6ecde025eff (diff)
downloadQt-5067683704580fcfedef4e68f19acedb133936e8.zip
Qt-5067683704580fcfedef4e68f19acedb133936e8.tar.gz
Qt-5067683704580fcfedef4e68f19acedb133936e8.tar.bz2
Merge branch 'qt-master-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-master-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (160 commits) audiodevices example: no devices available Assistant: Fix unintended tr context change. Add QFontMetrics benchmark. Fixed `make test' for xmlpatternsxqts. Doc: Put the correct images with the D-Bus and Embedded Linux sections. Call cheaper clear() instead of assigning new QString() Fix a regression: icons with slightly wrong ICO header did not load. Fix some foreach usage to use const refs Designer: Fix source code scanning issues. googlesuggest example: Add newline to end of file Core classes, examples, demos: Some changes from string to char Fix header labels on mac with rtl Fixed an endless loop if printing web pages. doc: Fixed the last qdoc errors. don't build unneeded QtDesigner parts on Windows CE doc: Document the "Type" enum value as a const in variable. Add additional text and painting benchmarks. Better support for user-generated binary shaders don't falsely complain about mismatched codecfortr Fix QSettings default paths not being initialized when setPath() is called ...
Diffstat (limited to 'src/script/api/qscriptvalue.cpp')
-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;
}