diff options
author | Liang Qi <liang.qi@qt.io> | 2018-02-14 11:55:27 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2018-02-14 11:56:26 +0000 |
commit | a400bbe50deb98f5d924cd4f6562e1b868e73248 (patch) | |
tree | a636e2224d3677aca2406bac5d835100610500e3 /src/core/changes/qpropertynodeaddedchange.cpp | |
parent | d360e16fdcab2197924e2505695c412bcaadbbe0 (diff) | |
parent | 1382b0cfb336cc04924d61b46f0b69dadb1c3d39 (diff) |
Merge "Merge remote-tracking branch 'origin/5.10.1' into 5.11" into refs/staging/5.11v5.11.0-alpha1
Diffstat (limited to 'src/core/changes/qpropertynodeaddedchange.cpp')
-rw-r--r-- | src/core/changes/qpropertynodeaddedchange.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/changes/qpropertynodeaddedchange.cpp b/src/core/changes/qpropertynodeaddedchange.cpp index 390a170b6..9f8e50872 100644 --- a/src/core/changes/qpropertynodeaddedchange.cpp +++ b/src/core/changes/qpropertynodeaddedchange.cpp @@ -76,6 +76,16 @@ QPropertyNodeAddedChange::QPropertyNodeAddedChange(QNodeId subjectId, QNode *nod { Q_D(QPropertyNodeAddedChange); d->m_addedNodeIdTypePair = QNodeIdTypePair(node->id(), QNodePrivate::findStaticMetaObject(node->metaObject())); + + // Ensure the node has issued a node creation change. We can end + // up here if a newly created node with a parent is immediately set + // as a property on another node. In this case the deferred call to + // _q_postConstructorInit() will not have happened yet as the event + // loop will still be blocked. So force it here and we catch this + // eventuality in the _q_postConstructorInit() function so that we + // do not repeat the creation and new child scene change events. + if (node) + QNodePrivate::get(node)->_q_postConstructorInit(); } /*! \internal */ |