diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-17 06:18:30 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-17 06:18:30 (GMT) |
commit | 85e625accb7f55b51e19016313bb204f6f0f835c (patch) | |
tree | b60a7fd15f68d49c530bfa3ca326bdcfe070a9c3 /src/script/bridge/qscriptdeclarativeclass.cpp | |
parent | 53fd1e2fd9c75d7d55606d4ac5df75eda96b9cc9 (diff) | |
parent | 67d8b96d11b560367f068c2466664898a6fb5aed (diff) | |
download | Qt-85e625accb7f55b51e19016313bb204f6f0f835c.zip Qt-85e625accb7f55b51e19016313bb204f6f0f835c.tar.gz Qt-85e625accb7f55b51e19016313bb204f6f0f835c.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (83 commits)
probably need to update user configurations once in a while too
use dynamicstore instead
Define JS_NO_EXPORT to avoid JSC C API functions being exported
Don't use QScriptValueIterator to iterate over an array
QtScript: Fix regression when calling newQObject() from native constructor
Added note to OS X installation instructions.
Keypress events ignored in listview on Cocoa (64 Bit) with Japanese IME
Update only appropriate rectangles during update_sys().
Marked QTDS obsolete from Qt 4.7.
QNetworkReply: Fix canReadLine()
Abort waiting replies on session error.
different approach to fixing "the other" aliasing issue
fix aliasing issue in node_construct()
detach in fewer cases, remove redundant calculation
SSL: Fix memleak related to local certificate
Improve keyboard layout detection on X11
Compile on ARM with -Werror -Wold-style-cast
Use the vista-style native dialog for QFileDialog::getExistingDirectory
Apply the stdset attribute for resource properties
doc: Completed sentence about HideNameFilterDetails
...
Diffstat (limited to 'src/script/bridge/qscriptdeclarativeclass.cpp')
-rw-r--r-- | src/script/bridge/qscriptdeclarativeclass.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/script/bridge/qscriptdeclarativeclass.cpp b/src/script/bridge/qscriptdeclarativeclass.cpp index 1d11ede..a753f59 100644 --- a/src/script/bridge/qscriptdeclarativeclass.cpp +++ b/src/script/bridge/qscriptdeclarativeclass.cpp @@ -141,19 +141,22 @@ QScriptValue QScriptDeclarativeClass::Value::toScriptValue(QScriptEngine *engine } QScriptDeclarativeClass::PersistentIdentifier::PersistentIdentifier() -: identifier(0) + : identifier(0), engine(0) { new (&d) JSC::Identifier(); } QScriptDeclarativeClass::PersistentIdentifier::~PersistentIdentifier() { + if (engine) + JSC::setCurrentIdentifierTable(engine->globalData->identifierTable); ((JSC::Identifier &)d).JSC::Identifier::~Identifier(); } QScriptDeclarativeClass::PersistentIdentifier::PersistentIdentifier(const PersistentIdentifier &other) { identifier = other.identifier; + engine = other.engine; new (&d) JSC::Identifier((JSC::Identifier &)(other.d)); } @@ -161,6 +164,7 @@ QScriptDeclarativeClass::PersistentIdentifier & QScriptDeclarativeClass::PersistentIdentifier::operator=(const PersistentIdentifier &other) { identifier = other.identifier; + engine = other.engine; ((JSC::Identifier &)d) = (JSC::Identifier &)(other.d); return *this; } @@ -419,7 +423,7 @@ QScriptDeclarativeClass::createPersistentIdentifier(const QString &str) static_cast<QScriptEnginePrivate *>(QObjectPrivate::get(d_ptr->engine)); JSC::ExecState* exec = p->currentFrame; - PersistentIdentifier rv(true); + PersistentIdentifier rv(p); new (&rv.d) JSC::Identifier(exec, (UChar *)str.constData(), str.size()); rv.identifier = (void *)((JSC::Identifier &)rv.d).ustring().rep(); return rv; @@ -432,7 +436,7 @@ QScriptDeclarativeClass::createPersistentIdentifier(const Identifier &id) static_cast<QScriptEnginePrivate *>(QObjectPrivate::get(d_ptr->engine)); JSC::ExecState* exec = p->currentFrame; - PersistentIdentifier rv(true); + PersistentIdentifier rv(p); new (&rv.d) JSC::Identifier(exec, (JSC::UString::Rep *)id); rv.identifier = (void *)((JSC::Identifier &)rv.d).ustring().rep(); return rv; |