summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2019-10-17 10:17:24 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2019-10-18 07:57:32 +0200
commited9edbf2f7af25e9d747e4dce424425242a63947 (patch)
tree068569784343503e415e7b1681ae9a4f16344837
parentdd5abf8117529bfa88ac0b57bbf09920d1fc10e9 (diff)
Adapt to private API change
Change-Id: I1765ac71243de0a9bf9b49e88332faa98d1745e6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--src/quicktemplates2/qquickdeferredexecute.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickdeferredexecute.cpp b/src/quicktemplates2/qquickdeferredexecute.cpp
index 800dcedb..d56131e4 100644
--- a/src/quicktemplates2/qquickdeferredexecute.cpp
+++ b/src/quicktemplates2/qquickdeferredexecute.cpp
@@ -92,11 +92,21 @@ static bool beginDeferred(QQmlEnginePrivate *enginePriv, const QQmlProperty &pro
typedef QMultiHash<int, const QV4::CompiledData::Binding *> QV4PropertyBindingHash;
auto it = std::reverse_iterator<QV4PropertyBindingHash::iterator>(range.second);
auto last = std::reverse_iterator<QV4PropertyBindingHash::iterator>(range.first);
+#if Q_QML_PRIVATE_API_VERSION < 7
while (it != last) {
if (!state->creator->populateDeferredBinding(property, deferData, *it))
state->errors << state->creator->errors;
++it;
}
+#else
+ state->creator->beginPopulateDeferred(deferData->context);
+ while (it != last) {
+ state->creator->populateDeferredBinding(property, deferData->deferredIdx, *it);
+ ++it;
+ }
+ state->creator->finalizePopulateDeferred();
+ state->errors << state->creator->errors;
+#endif
deferredState->constructionStates += state;