diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-03-06 16:55:09 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-07 15:33:19 +0100 |
commit | 99efe4309379482fce5c231885883e359bf85290 (patch) | |
tree | dbb9333a547fa1939bd63bd64136611e9fe82968 /src/qml/qml/qqmlincubator.cpp | |
parent | 9fc17c08e5635cf112c6194e6c24af2a9c7caf00 (diff) |
Remove old compiler and VME
This removes the bulk of the code. A few smaller cleanups remain, to be
done in smaller changes as they move code around.
Additionally the "optimize" option of qqmlbundle was removed. It called QQmlScript::Parser::preparseData,
which however was not implemented and always returned an empty QByteArray. Therefore "optimize" would not
do anything and the class is gone now :)
Change-Id: I0c265e756704cb53c5250be1f69e4a3e1b6e64d5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlincubator.cpp')
-rw-r--r-- | src/qml/qml/qqmlincubator.cpp | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/src/qml/qml/qqmlincubator.cpp b/src/qml/qml/qqmlincubator.cpp index da4de338ee..4c9c99f1f6 100644 --- a/src/qml/qml/qqmlincubator.cpp +++ b/src/qml/qml/qqmlincubator.cpp @@ -98,10 +98,7 @@ void QQmlEnginePrivate::incubate(QQmlIncubator &i, QQmlContextData *forContext) incubatorList.insert(p.data()); incubatorCount++; - if (useNewCompiler) - p->vmeGuard.guard(p->creator.data()); - else - p->vmeGuard.guard(&p->vme); + p->vmeGuard.guard(p->creator.data()); p->changeStatus(QQmlIncubator::Loading); if (incubationController) @@ -137,7 +134,7 @@ QQmlIncubationController *QQmlEngine::incubationController() const QQmlIncubatorPrivate::QQmlIncubatorPrivate(QQmlIncubator *q, QQmlIncubator::IncubationMode m) : q(q), status(QQmlIncubator::Null), mode(m), isAsynchronous(false), progress(Execute), - result(0), compiledData(0), vme(this), waitingOnMe(0) + result(0), compiledData(0), waitingOnMe(0) { } @@ -297,13 +294,9 @@ void QQmlIncubatorPrivate::incubate(QQmlInstantiationInterrupt &i) if (progress == QQmlIncubatorPrivate::Execute) { enginePriv->referenceScarceResources(); QObject *tresult = 0; - if (enginePriv->useNewCompiler) { - tresult = creator->create(subComponentToCreate, /*parent*/0, &i); - if (!tresult) - errors = creator->errors; - } else { - tresult = vme.execute(&errors, i); - } + tresult = creator->create(subComponentToCreate, /*parent*/0, &i); + if (!tresult) + errors = creator->errors; enginePriv->dereferenceScarceResources(); if (watcher.hasRecursed()) @@ -347,10 +340,7 @@ void QQmlIncubatorPrivate::incubate(QQmlInstantiationInterrupt &i) return; QQmlContextData *ctxt = 0; - if (enginePriv->useNewCompiler) - ctxt = creator->finalize(i); - else - ctxt = vme.complete(i); + ctxt = creator->finalize(i); if (ctxt) { rootContext = ctxt; progress = QQmlIncubatorPrivate::Completed; @@ -382,10 +372,7 @@ finishIncubate: } } } else { - if (enginePriv->useNewCompiler) - vmeGuard.guard(creator.data()); - else - vmeGuard.guard(&vme); + vmeGuard.guard(creator.data()); } } @@ -584,7 +571,6 @@ void QQmlIncubator::clear() bool guardOk = d->vmeGuard.isOK(); - d->vme.reset(); d->vmeGuard.clear(); if (d->creator && guardOk) d->creator->clear(); |