diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-09-05 17:31:41 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-29 06:12:49 +0200 |
commit | 703c808a5649169dd6b9605af273374cd62951d1 (patch) | |
tree | 7248cc72bfa632a51c814d6622f0b12a7f2bd443 /src/declarative/qml/v4 | |
parent | 600e56ad053362dd5d4150f5dec6b93c2fee575b (diff) |
Asynchronous component instantiation
This introduces two main:
* the QML compiler executes in a separate thread
* item instantiation can be interrupted and resumed to
allow it to be split across multiple frames.
Task-number: QTBUG-21151
Change-Id: I9631c62bb77da3a2e0c37f0da3719533fdce4fef
Reviewed-on: http://codereview.qt-project.org/5676
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/declarative/qml/v4')
-rw-r--r-- | src/declarative/qml/v4/qdeclarativev4bindings.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/declarative/qml/v4/qdeclarativev4bindings.cpp b/src/declarative/qml/v4/qdeclarativev4bindings.cpp index 1a1f5cc8f6..7aa5496403 100644 --- a/src/declarative/qml/v4/qdeclarativev4bindings.cpp +++ b/src/declarative/qml/v4/qdeclarativev4bindings.cpp @@ -749,9 +749,12 @@ void **QDeclarativeV4Bindings::getDecodeInstrTable() { static void **decode_instr; if (!decode_instr) { - QDeclarativeV4Bindings dummy(0, 0, 0); + QDeclarativeV4Bindings *dummy = new QDeclarativeV4Bindings(0, 0, 0); quint32 executedBlocks = 0; - dummy.d_func()->run(0, executedBlocks, 0, 0, 0, 0, QDeclarativePropertyPrivate::BypassInterceptor, &decode_instr); + dummy->d_func()->run(0, executedBlocks, 0, 0, 0, 0, + QDeclarativePropertyPrivate::BypassInterceptor, + &decode_instr); + dummy->release(); } return decode_instr; } @@ -786,7 +789,6 @@ void QDeclarativeV4BindingsPrivate::run(int instrIndex, quint32 &executedBlocks, executedBlocks = 0; - QDeclarativeEnginePrivate *engine = QDeclarativeEnginePrivate::get(context->engine); const char *code = program->instructions(); code += instrIndex * QML_V4_INSTR_SIZE(Jump, jump); const V4Instr *instr = reinterpret_cast<const V4Instr *>(code); |