diff options
author | Richard Weickelt <richard@weickelt.de> | 2018-05-15 12:28:41 +0200 |
---|---|---|
committer | Richard Weickelt <richard@weickelt.de> | 2018-05-18 09:29:26 +0000 |
commit | d33d5a40483c6b56c3be19ce244f14938a5941a0 (patch) | |
tree | fdc7a803067b976ccf24470ee9288238806e1667 /src/qml/qml/qqmlcomponent_p.h | |
parent | 38dc69ae01d2ba733fb35f7c8d26500062858798 (diff) |
Allow partial creation of more than 10 QQmlComponent instances
The recursion detection in QQmlComponent erroneously triggered when
calling beginCreate() on >= 10 different instances. This may happen by
intention and is not necessarily a sign of recursion.
Since beginCreate() does never invoke a potentially nested
Qt.createComponent(), but completeCreate() does, it is better to
modify the creationDepth counter in completeCreate(). This also leads
to simpler code.
The test, however, can remain in beginCreate().
Task-number: QTBUG-47633
Change-Id: If413a8b08421d321d6a426ec16600996cb3f6ea1
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlcomponent_p.h')
-rw-r--r-- | src/qml/qml/qqmlcomponent_p.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlcomponent_p.h b/src/qml/qml/qqmlcomponent_p.h index 83af5074b8..9b2db4bccf 100644 --- a/src/qml/qml/qqmlcomponent_p.h +++ b/src/qml/qml/qqmlcomponent_p.h @@ -79,7 +79,7 @@ class Q_QML_PRIVATE_EXPORT QQmlComponentPrivate : public QObjectPrivate, public public: QQmlComponentPrivate() - : progress(0.), start(-1), engine(nullptr), creationContext(nullptr), depthIncreased(false) {} + : progress(0.), start(-1), engine(nullptr), creationContext(nullptr) {} void loadUrl(const QUrl &newUrl, QQmlComponent::CompilationMode mode = QQmlComponent::PreferSynchronous); @@ -136,7 +136,6 @@ public: QQmlEngine *engine; QQmlGuardedContextData creationContext; - bool depthIncreased; void clear(); |