diff options
author | hjk <hjk@qt.io> | 2019-07-03 18:34:30 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-07-04 12:28:38 +0000 |
commit | 6a58666f4403cdde1809784c1cc98668a4b02cfc (patch) | |
tree | af2ab09f192f779947a71022a91fb090bbfd5353 /share/qtcreator | |
parent | 599b03179e392b97023c6ebca98faa514967841a (diff) | |
download | qt-creator-6a58666f4403cdde1809784c1cc98668a4b02cfc.tar.gz |
More Utils::toSet/toList
... and unrelated cosmetic changes.
Change-Id: I591b17fd5289831e701b683f8fb47816efd1fa67
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share/qtcreator')
4 files changed, 20 insertions, 7 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp index a9a8111afd..56e407f62b 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp @@ -67,6 +67,8 @@ #include <tokencommand.h> #include <removesharedmemorycommand.h> +#include <utils/algorithm.h> + #include <QDebug> #include <QQmlEngine> #include <QQmlApplicationEngine> @@ -88,7 +90,10 @@ #include <algorithm> namespace { -bool testImportStatements(const QStringList &importStatementList, const QUrl &url, QString *errorMessage = 0) { + +bool testImportStatements(const QStringList &importStatementList, + const QUrl &url, QString *errorMessage = nullptr) +{ if (importStatementList.isEmpty()) return false; // ToDo: move engine outside of this function, this makes it expensive @@ -455,7 +460,7 @@ void NodeInstanceServer::setupImports(const QVector<AddImportContainer> &contain delete m_importComponent.data(); delete m_importComponentObject.data(); - const QStringList importStatementList(importStatementSet.toList()); + const QStringList importStatementList = Utils::toList(importStatementSet); const QStringList fullImportStatementList(QStringList(qtQuickImport) + importStatementList); // check possible import statements combinations diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp index 9e0461ba29..99688fa7cc 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp @@ -60,6 +60,8 @@ #include <designersupportdelegate.h> +#include <utils/algorithm.h> + namespace QmlDesigner { Qt5InformationNodeInstanceServer::Qt5InformationNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) : @@ -166,13 +168,14 @@ void Qt5InformationNodeInstanceServer::collectItemChangesAndSendChangeCommands() sendTokenBack(); if (!informationChangedInstanceSet.isEmpty()) - nodeInstanceClient()->informationChanged(createAllInformationChangedCommand(informationChangedInstanceSet.toList())); + nodeInstanceClient()->informationChanged( + createAllInformationChangedCommand(Utils::toList(informationChangedInstanceSet))); if (!propertyChangedList.isEmpty()) nodeInstanceClient()->valuesChanged(createValuesChangedCommand(propertyChangedList)); if (!m_parentChangedSet.isEmpty()) { - sendChildrenChangedCommand(m_parentChangedSet.toList()); + sendChildrenChangedCommand(Utils::toList(m_parentChangedSet)); m_parentChangedSet.clear(); } diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.cpp index 8e221c9ea2..19160d9ea9 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.cpp @@ -60,6 +60,8 @@ #include <designersupportdelegate.h> +#include <utils/algorithm.h> + namespace QmlDesigner { Qt5RenderNodeInstanceServer::Qt5RenderNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) : @@ -94,7 +96,7 @@ void Qt5RenderNodeInstanceServer::collectItemChangesAndSendChangeCommands() clearChangedPropertyList(); if (!m_dirtyInstanceSet.isEmpty()) { - nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand(m_dirtyInstanceSet.toList())); + nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand(Utils::toList(m_dirtyInstanceSet))); m_dirtyInstanceSet.clear(); } diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5testnodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5testnodeinstanceserver.cpp index ec90f0ce63..1f8540359b 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5testnodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5testnodeinstanceserver.cpp @@ -62,6 +62,8 @@ #include <designersupportdelegate.h> +#include <utils/algorithm.h> + namespace QmlDesigner { Qt5TestNodeInstanceServer::Qt5TestNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) @@ -288,7 +290,8 @@ void QmlDesigner::Qt5TestNodeInstanceServer::collectItemChangesAndSendChangeComm clearChangedPropertyList(); if (!informationChangedInstanceSet.isEmpty()) { - InformationChangedCommand command = createAllInformationChangedCommand(informationChangedInstanceSet.toList()); + InformationChangedCommand command + = createAllInformationChangedCommand(Utils::toList(informationChangedInstanceSet)); command.sort(); nodeInstanceClient()->informationChanged(command); } @@ -299,7 +302,7 @@ void QmlDesigner::Qt5TestNodeInstanceServer::collectItemChangesAndSendChangeComm } if (!parentChangedSet.isEmpty()) - sendChildrenChangedCommand(parentChangedSet.toList()); + sendChildrenChangedCommand(Utils::toList(parentChangedSet)); } } |