summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlbasicscript.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-10-27 04:05:26 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-10-27 04:05:26 (GMT)
commit2af9bc37a5955e8e1da2c3ba03fa0be763e2ae5e (patch)
tree778e6e7341a4a6b159a3716e6255179d0a229db0 /src/declarative/qml/qmlbasicscript.cpp
parent1a862af842db0196313ab7819b607763fd0d87db (diff)
downloadQt-2af9bc37a5955e8e1da2c3ba03fa0be763e2ae5e.zip
Qt-2af9bc37a5955e8e1da2c3ba03fa0be763e2ae5e.tar.gz
Qt-2af9bc37a5955e8e1da2c3ba03fa0be763e2ae5e.tar.bz2
Simplify the defaultObjects handling
As the scope object is no longer added to the defaultObjects list it makes sense that the root object remain constant at position 0
Diffstat (limited to 'src/declarative/qml/qmlbasicscript.cpp')
-rw-r--r--src/declarative/qml/qmlbasicscript.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlbasicscript.cpp b/src/declarative/qml/qmlbasicscript.cpp
index b7aac54..eba4307 100644
--- a/src/declarative/qml/qmlbasicscript.cpp
+++ b/src/declarative/qml/qmlbasicscript.cpp
@@ -658,7 +658,7 @@ QVariant QmlBasicScript::run(QmlContext *context, QObject *me)
case ScriptInstruction::FetchRootConstant:
{
- QObject *obj = contextPrivate->defaultObjects.last();
+ QObject *obj = contextPrivate->defaultObjects.at(0);
stack.push(fetch_value(obj, instr.constant.idx, instr.constant.type));
if (obj && instr.constant.notify != 0)