forked from qt-creator/qt-creator
QmlDesigner: Fix custom qml2puppet build
The build of a custom qml2puppet was failing, because of utils/algorithm.h missing. We should minimize Qt Creator dependencies in the puppet. Change-Id: Iba8dd1a3979dbeeb1bfa860b50ba586bea20c7a7 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -67,8 +67,6 @@
|
||||
#include <tokencommand.h>
|
||||
#include <removesharedmemorycommand.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QQmlEngine>
|
||||
#include <QQmlApplicationEngine>
|
||||
@@ -460,7 +458,7 @@ void NodeInstanceServer::setupImports(const QVector<AddImportContainer> &contain
|
||||
|
||||
delete m_importComponent.data();
|
||||
delete m_importComponentObject.data();
|
||||
const QStringList importStatementList = Utils::toList(importStatementSet);
|
||||
const QStringList importStatementList = QtHelpers::toList(importStatementSet);
|
||||
const QStringList fullImportStatementList(QStringList(qtQuickImport) + importStatementList);
|
||||
|
||||
// check possible import statements combinations
|
||||
|
||||
@@ -35,6 +35,18 @@
|
||||
#include "servernodeinstance.h"
|
||||
#include "debugoutputcommand.h"
|
||||
|
||||
namespace QtHelpers {
|
||||
template <class T>
|
||||
QList<T>toList(const QSet<T> &set)
|
||||
{
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
|
||||
return set.toList();
|
||||
#else
|
||||
return QList<T>(set.begin(), set.end());
|
||||
#endif
|
||||
}
|
||||
} //QtHelpers
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QFileSystemWatcher;
|
||||
class QQmlView;
|
||||
|
||||
@@ -60,8 +60,6 @@
|
||||
|
||||
#include <designersupportdelegate.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
Qt5InformationNodeInstanceServer::Qt5InformationNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) :
|
||||
@@ -169,13 +167,13 @@ void Qt5InformationNodeInstanceServer::collectItemChangesAndSendChangeCommands()
|
||||
|
||||
if (!informationChangedInstanceSet.isEmpty())
|
||||
nodeInstanceClient()->informationChanged(
|
||||
createAllInformationChangedCommand(Utils::toList(informationChangedInstanceSet)));
|
||||
createAllInformationChangedCommand(QtHelpers::toList(informationChangedInstanceSet)));
|
||||
|
||||
if (!propertyChangedList.isEmpty())
|
||||
nodeInstanceClient()->valuesChanged(createValuesChangedCommand(propertyChangedList));
|
||||
|
||||
if (!m_parentChangedSet.isEmpty()) {
|
||||
sendChildrenChangedCommand(Utils::toList(m_parentChangedSet));
|
||||
sendChildrenChangedCommand(QtHelpers::toList(m_parentChangedSet));
|
||||
m_parentChangedSet.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -60,8 +60,6 @@
|
||||
|
||||
#include <designersupportdelegate.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
Qt5RenderNodeInstanceServer::Qt5RenderNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) :
|
||||
@@ -96,7 +94,7 @@ void Qt5RenderNodeInstanceServer::collectItemChangesAndSendChangeCommands()
|
||||
clearChangedPropertyList();
|
||||
|
||||
if (!m_dirtyInstanceSet.isEmpty()) {
|
||||
nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand(Utils::toList(m_dirtyInstanceSet)));
|
||||
nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand(QtHelpers::toList(m_dirtyInstanceSet)));
|
||||
m_dirtyInstanceSet.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -62,8 +62,6 @@
|
||||
|
||||
#include <designersupportdelegate.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
Qt5TestNodeInstanceServer::Qt5TestNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient)
|
||||
@@ -291,7 +289,7 @@ void QmlDesigner::Qt5TestNodeInstanceServer::collectItemChangesAndSendChangeComm
|
||||
|
||||
if (!informationChangedInstanceSet.isEmpty()) {
|
||||
InformationChangedCommand command
|
||||
= createAllInformationChangedCommand(Utils::toList(informationChangedInstanceSet));
|
||||
= createAllInformationChangedCommand(QtHelpers::toList(informationChangedInstanceSet));
|
||||
command.sort();
|
||||
nodeInstanceClient()->informationChanged(command);
|
||||
}
|
||||
@@ -302,7 +300,7 @@ void QmlDesigner::Qt5TestNodeInstanceServer::collectItemChangesAndSendChangeComm
|
||||
}
|
||||
|
||||
if (!parentChangedSet.isEmpty())
|
||||
sendChildrenChangedCommand(Utils::toList(parentChangedSet));
|
||||
sendChildrenChangedCommand(QtHelpers::toList(parentChangedSet));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user