diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-11 07:53:42 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-11 07:54:35 (GMT) |
commit | 303730a3fdd399a3e0a65b08338b4db75aa2acee (patch) | |
tree | 4d265dfdf43a214a44f2f1e0408f6e873a1c671e /src/declarative/qml/qdeclarativecompiledbindings.cpp | |
parent | 79dc9daa146410c7da8d4691e9a4489251980ab3 (diff) | |
download | Qt-303730a3fdd399a3e0a65b08338b4db75aa2acee.zip Qt-303730a3fdd399a3e0a65b08338b4db75aa2acee.tar.gz Qt-303730a3fdd399a3e0a65b08338b4db75aa2acee.tar.bz2 |
Replace QDeclarativeContext::addDefaultObject() -> setContextObject()
It is faster and easier to use to just support a single context object.
Diffstat (limited to 'src/declarative/qml/qdeclarativecompiledbindings.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativecompiledbindings.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp index b35b5b5..c66a417 100644 --- a/src/declarative/qml/qdeclarativecompiledbindings.cpp +++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp @@ -845,7 +845,7 @@ void QDeclarativeCompiledBindingsPrivate::findgeneric(Register *output, } } - if (QObject *root = context->defaultObjects.isEmpty()?0:context->defaultObjects.first()) { + if (QObject *root = context->contextObject) { if (findproperty(root, output, enginePriv, subIdx, name, isTerminal)) return; @@ -1086,7 +1086,7 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex, break; case Instr::LoadRoot: - registers[instr->load.reg].setQObject(context->defaultObjects.at(0)); + registers[instr->load.reg].setQObject(context->contextObject); break; case Instr::LoadAttached: |