qmlpuppet: Fix build with Qt 5

The API uses QVector, which is a QList in Qt 6, which is why assigning a
QVector to a QList works "fine" there. But with Qt 5 we must use the
correct type.

Also assign to a const variable. Otherwise this actually forces a
detach.

Amends 9321c6ad24

Change-Id: Ied562b96d647435ae48395ae08cc12a5670ac607
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Eike Ziller
2022-12-23 15:02:47 +01:00
parent 3c281e315b
commit b8e195d22b

View File

@@ -2123,7 +2123,7 @@ void Qt5InformationNodeInstanceServer::completeComponent(const CompleteComponent
Qt5NodeInstanceServer::completeComponent(command);
QList<ServerNodeInstance> instanceList;
QList<qint32> instances = command.instances();
const QVector<qint32> instances = command.instances();
for (qint32 instanceId : instances) {
if (hasInstanceForId(instanceId)) {
ServerNodeInstance instance = instanceForId(instanceId);