summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2011-02-02 07:11:32 (GMT)
committerKent Hansen <kent.hansen@nokia.com>2011-02-03 09:52:21 (GMT)
commit48f8d0cf20f8bcdb35bfc49057ad1fa768e66825 (patch)
treee6dc0445b73c4c42214a6eee725bc003c07418d7 /src/script
parenta97a36aac550c175a2e2045ead55ad4d263a24ed (diff)
downloadQt-48f8d0cf20f8bcdb35bfc49057ad1fa768e66825.zip
Qt-48f8d0cf20f8bcdb35bfc49057ad1fa768e66825.tar.gz
Qt-48f8d0cf20f8bcdb35bfc49057ad1fa768e66825.tar.bz2
Bring back "classic" iteration order of QScriptClass properties
In the old back-end, normal JS properties were iterated before QScriptClass properties. There wasn't any good reason to change that. Now we can get rid of that left-over XFAIL as well. Task-number: QTBUG-16746 Reviewed-by: Jedrzej Nowacki
Diffstat (limited to 'src/script')
-rw-r--r--src/script/bridge/qscriptclassobject.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/script/bridge/qscriptclassobject.cpp b/src/script/bridge/qscriptclassobject.cpp
index 9285883..2085756 100644
--- a/src/script/bridge/qscriptclassobject.cpp
+++ b/src/script/bridge/qscriptclassobject.cpp
@@ -183,6 +183,10 @@ void ClassObjectDelegate::getOwnPropertyNames(QScriptObject* object, JSC::ExecSt
JSC::PropertyNameArray &propertyNames,
JSC::EnumerationMode mode)
{
+ // For compatibility with the old back-end, normal JS properties
+ // are added first.
+ QScriptObjectDelegate::getOwnPropertyNames(object, exec, propertyNames, mode);
+
QScriptEnginePrivate *engine = scriptEngineFromExec(exec);
QScript::SaveFrameHelper saveFrame(engine, exec);
QScriptValue scriptObject = engine->scriptValueFromJSCValue(object);
@@ -195,7 +199,6 @@ void ClassObjectDelegate::getOwnPropertyNames(QScriptObject* object, JSC::ExecSt
}
delete it;
}
- QScriptObjectDelegate::getOwnPropertyNames(object, exec, propertyNames, mode);
}
JSC::CallType ClassObjectDelegate::getCallData(QScriptObject*, JSC::CallData &callData)