QmlDesigner.qml2puppet: Fix build with Qt6

Change-Id: Ib9580fa1b6c1699e830898234b286f3ee999d477
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Thomas Hartmann
2020-10-05 15:37:36 +02:00
parent aeb30c0840
commit 469e7a7edf

View File

@@ -230,13 +230,21 @@ void emitComponentComplete(QObject *item)
QQmlData *data = QQmlData::get(item);
if (data && data->context) {
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QQmlComponentAttached *componentAttached = data->context->componentAttached;
#else
QQmlComponentAttached *componentAttached = data->context->componentAttacheds();
#endif
while (componentAttached) {
if (componentAttached->parent())
if (componentAttached->parent() == item)
emit componentAttached->completed();
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
componentAttached = componentAttached->next;
#else
componentAttached = componentAttached->next();
#endif
}
}
}