forked from qt-creator/qt-creator
QmlDesigner: Fix compilation of coretests
This reverts commit 7856c2c2f0
. There were files
compiled which are not used in the tests but have external dependencies.
So instead of using the preprocessor we simply don't link the source
files in the project.
Change-Id: Ibba4a1dace1868b016af7135262c795bb29af204
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -33,6 +33,8 @@
|
|||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QLocalSocket;
|
class QLocalSocket;
|
||||||
class QIODevice;
|
class QIODevice;
|
||||||
|
@@ -7,7 +7,7 @@ DEFINES += DESIGNER_CORE_LIBRARY
|
|||||||
INCLUDEPATH += $$PWD \
|
INCLUDEPATH += $$PWD \
|
||||||
$$PWD/include
|
$$PWD/include
|
||||||
|
|
||||||
include (instances/instances.pri)
|
include (instances/instances-lib.pri)
|
||||||
include (../../../../share/qtcreator/qml/qmlpuppet/interfaces/interfaces.pri)
|
include (../../../../share/qtcreator/qml/qmlpuppet/interfaces/interfaces.pri)
|
||||||
include (../../../../share/qtcreator/qml/qmlpuppet/commands/commands.pri)
|
include (../../../../share/qtcreator/qml/qmlpuppet/commands/commands.pri)
|
||||||
include (../../../../share/qtcreator/qml/qmlpuppet/container/container.pri)
|
include (../../../../share/qtcreator/qml/qmlpuppet/container/container.pri)
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
#include <QTime>
|
#include <QTime>
|
||||||
#include <QtGui/qevent.h>
|
#include <QtGui/qevent.h>
|
||||||
|
|
||||||
#include <memory.h>
|
#include <memory>
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
class Target;
|
class Target;
|
||||||
|
@@ -0,0 +1,22 @@
|
|||||||
|
INCLUDEPATH += $$PWD/
|
||||||
|
|
||||||
|
HEADERS += $$PWD/../include/nodeinstance.h \
|
||||||
|
$$PWD/baseconnectionmanager.h \
|
||||||
|
$$PWD/connectionmanager.h \
|
||||||
|
$$PWD/connectionmanagerinterface.h \
|
||||||
|
$$PWD/nodeinstanceserverproxy.h \
|
||||||
|
$$PWD/puppetcreator.h \
|
||||||
|
$$PWD/puppetbuildprogressdialog.h \
|
||||||
|
$$PWD/qprocessuniqueptr.h
|
||||||
|
|
||||||
|
SOURCES += $$PWD/nodeinstanceserverproxy.cpp \
|
||||||
|
$$PWD/baseconnectionmanager.cpp \
|
||||||
|
$$PWD/connectionmanager.cpp \
|
||||||
|
$$PWD/connectionmanagerinterface.cpp \
|
||||||
|
$$PWD/nodeinstance.cpp \
|
||||||
|
$$PWD/nodeinstanceview.cpp \
|
||||||
|
$$PWD/puppetcreator.cpp \
|
||||||
|
$$PWD/puppetbuildprogressdialog.cpp
|
||||||
|
|
||||||
|
FORMS += $$PWD/puppetbuildprogressdialog.ui
|
||||||
|
|
@@ -1,25 +1,7 @@
|
|||||||
INCLUDEPATH += $$PWD/
|
INCLUDEPATH += $$PWD/
|
||||||
|
|
||||||
HEADERS += $$PWD/../include/nodeinstance.h \
|
HEADERS += $$PWD/capturingconnectionmanager.h \
|
||||||
$$PWD/baseconnectionmanager.h \
|
$$PWD/interactiveconnectionmanager.h
|
||||||
$$PWD/capturingconnectionmanager.h \
|
|
||||||
$$PWD/connectionmanager.h \
|
|
||||||
$$PWD/connectionmanagerinterface.h \
|
|
||||||
$$PWD/interactiveconnectionmanager.h \
|
|
||||||
$$PWD/nodeinstanceserverproxy.h \
|
|
||||||
$$PWD/puppetcreator.h \
|
|
||||||
$$PWD/puppetbuildprogressdialog.h \
|
|
||||||
$$PWD/qprocessuniqueptr.h
|
|
||||||
|
|
||||||
SOURCES += $$PWD/nodeinstanceserverproxy.cpp \
|
SOURCES += $$PWD/capturingconnectionmanager.cpp \
|
||||||
$$PWD/baseconnectionmanager.cpp \
|
$$PWD/interactiveconnectionmanager.cpp
|
||||||
$$PWD/capturingconnectionmanager.cpp \
|
|
||||||
$$PWD/connectionmanager.cpp \
|
|
||||||
$$PWD/connectionmanagerinterface.cpp \
|
|
||||||
$$PWD/interactiveconnectionmanager.cpp \
|
|
||||||
$$PWD/nodeinstance.cpp \
|
|
||||||
$$PWD/nodeinstanceview.cpp \
|
|
||||||
$$PWD/puppetcreator.cpp \
|
|
||||||
$$PWD/puppetbuildprogressdialog.cpp
|
|
||||||
|
|
||||||
FORMS += $$PWD/puppetbuildprogressdialog.ui
|
|
||||||
|
@@ -27,9 +27,7 @@
|
|||||||
#include "nodeinstanceserverproxy.h"
|
#include "nodeinstanceserverproxy.h"
|
||||||
#include "nodeinstanceview.h"
|
#include "nodeinstanceview.h"
|
||||||
|
|
||||||
#ifndef QMLDESIGNER_TEST
|
|
||||||
#include <qmldesignerplugin.h>
|
#include <qmldesignerplugin.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <coreplugin/messagebox.h>
|
#include <coreplugin/messagebox.h>
|
||||||
|
|
||||||
@@ -51,7 +49,6 @@ void InteractiveConnectionManager::setUp(NodeInstanceServerProxy *nodeInstanceSe
|
|||||||
{
|
{
|
||||||
ConnectionManager::setUp(nodeInstanceServerProxy, qrcMappingString, target);
|
ConnectionManager::setUp(nodeInstanceServerProxy, qrcMappingString, target);
|
||||||
|
|
||||||
#ifndef QMLDESIGNER_TEST
|
|
||||||
DesignerSettings settings = QmlDesignerPlugin::instance()->settings();
|
DesignerSettings settings = QmlDesignerPlugin::instance()->settings();
|
||||||
int timeOutTime = settings.value(DesignerSettingsKey::PUPPET_KILL_TIMEOUT).toInt();
|
int timeOutTime = settings.value(DesignerSettingsKey::PUPPET_KILL_TIMEOUT).toInt();
|
||||||
for (Connection &connection : m_connections)
|
for (Connection &connection : m_connections)
|
||||||
@@ -68,7 +65,6 @@ void InteractiveConnectionManager::setUp(NodeInstanceServerProxy *nodeInstanceSe
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InteractiveConnectionManager::showCannotConnectToPuppetWarningAndSwitchToEditMode()
|
void InteractiveConnectionManager::showCannotConnectToPuppetWarningAndSwitchToEditMode()
|
||||||
@@ -78,11 +74,9 @@ void InteractiveConnectionManager::showCannotConnectToPuppetWarningAndSwitchToEd
|
|||||||
tr("The executable of the QML emulation layer (QML Puppet) may not be responding. "
|
tr("The executable of the QML emulation layer (QML Puppet) may not be responding. "
|
||||||
"Switching to another kit might help."));
|
"Switching to another kit might help."));
|
||||||
|
|
||||||
#ifndef QMLDESIGNER_TEST
|
|
||||||
QmlDesignerPlugin::instance()->switchToTextModeDeferred();
|
QmlDesignerPlugin::instance()->switchToTextModeDeferred();
|
||||||
nodeInstanceServerProxy()->nodeInstanceView()->emitDocumentMessage(
|
nodeInstanceServerProxy()->nodeInstanceView()->emitDocumentMessage(
|
||||||
tr("Cannot Connect to QML Emulation Layer (QML Puppet)"));
|
tr("Cannot Connect to QML Emulation Layer (QML Puppet)"));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InteractiveConnectionManager::dispatchCommand(const QVariant &command, Connection &connection)
|
void InteractiveConnectionManager::dispatchCommand(const QVariant &command, Connection &connection)
|
||||||
|
@@ -83,11 +83,12 @@
|
|||||||
#include <coreplugin/actionmanager/actionmanager.h>
|
#include <coreplugin/actionmanager/actionmanager.h>
|
||||||
#include <coreplugin/editormanager/editormanager.h>
|
#include <coreplugin/editormanager/editormanager.h>
|
||||||
#include <coreplugin/documentmanager.h>
|
#include <coreplugin/documentmanager.h>
|
||||||
#include <qmlprojectmanager/qmlmultilanguageaspect.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
|
||||||
|
#include <qmlprojectmanager/qmlmultilanguageaspect.h>
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
@@ -551,10 +552,8 @@ void NodeInstanceView::auxiliaryDataChanged(const ModelNode &node,
|
|||||||
}
|
}
|
||||||
} else if (node.isRootNode() && name == "language@Internal") {
|
} else if (node.isRootNode() && name == "language@Internal") {
|
||||||
const QString languageAsString = value.toString();
|
const QString languageAsString = value.toString();
|
||||||
#ifndef QMLDESIGNER_TEST
|
|
||||||
if (auto multiLanguageAspect = QmlProjectManager::QmlMultiLanguageAspect::current(m_currentTarget))
|
if (auto multiLanguageAspect = QmlProjectManager::QmlMultiLanguageAspect::current(m_currentTarget))
|
||||||
multiLanguageAspect->setCurrentLocale(languageAsString);
|
multiLanguageAspect->setCurrentLocale(languageAsString);
|
||||||
#endif
|
|
||||||
m_nodeInstanceServer->changeLanguage({languageAsString});
|
m_nodeInstanceServer->changeLanguage({languageAsString});
|
||||||
} else if (node.isRootNode() && name == "previewSize@Internal") {
|
} else if (node.isRootNode() && name == "previewSize@Internal") {
|
||||||
m_nodeInstanceServer->changePreviewImageSize(value.toSize());
|
m_nodeInstanceServer->changePreviewImageSize(value.toSize());
|
||||||
@@ -993,10 +992,8 @@ CreateSceneCommand NodeInstanceView::createCreateSceneCommand()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString lastUsedLanguage;
|
QString lastUsedLanguage;
|
||||||
#ifndef QMLDESIGNER_TEST
|
|
||||||
if (auto multiLanguageAspect = QmlProjectManager::QmlMultiLanguageAspect::current(m_currentTarget))
|
if (auto multiLanguageAspect = QmlProjectManager::QmlMultiLanguageAspect::current(m_currentTarget))
|
||||||
lastUsedLanguage = multiLanguageAspect->currentLocale();
|
lastUsedLanguage = multiLanguageAspect->currentLocale();
|
||||||
#endif
|
|
||||||
|
|
||||||
return CreateSceneCommand(
|
return CreateSceneCommand(
|
||||||
instanceContainerList,
|
instanceContainerList,
|
||||||
|
@@ -30,7 +30,6 @@
|
|||||||
#include <model.h>
|
#include <model.h>
|
||||||
#ifndef QMLDESIGNER_TEST
|
#ifndef QMLDESIGNER_TEST
|
||||||
#include <qmldesignerplugin.h>
|
#include <qmldesignerplugin.h>
|
||||||
#include <qmlprojectmanager/qmlmultilanguageaspect.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <nodeinstanceview.h>
|
#include <nodeinstanceview.h>
|
||||||
@@ -46,6 +45,8 @@
|
|||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <projectexplorer/toolchain.h>
|
#include <projectexplorer/toolchain.h>
|
||||||
|
|
||||||
|
#include <qmlprojectmanager/qmlmultilanguageaspect.h>
|
||||||
|
|
||||||
#include <qtsupport/baseqtversion.h>
|
#include <qtsupport/baseqtversion.h>
|
||||||
#include <qtsupport/qtkitinformation.h>
|
#include <qtsupport/qtkitinformation.h>
|
||||||
#include <qtsupport/qtsupportconstants.h>
|
#include <qtsupport/qtsupportconstants.h>
|
||||||
@@ -520,12 +521,10 @@ QProcessEnvironment PuppetCreator::processEnvironment() const
|
|||||||
|
|
||||||
customFileSelectors = m_target->additionalData("CustomFileSelectorsData").toStringList();
|
customFileSelectors = m_target->additionalData("CustomFileSelectorsData").toStringList();
|
||||||
|
|
||||||
#ifndef QMLDESIGNER_TEST
|
|
||||||
if (auto multiLanguageAspect = QmlProjectManager::QmlMultiLanguageAspect::current(m_target)) {
|
if (auto multiLanguageAspect = QmlProjectManager::QmlMultiLanguageAspect::current(m_target)) {
|
||||||
if (!multiLanguageAspect->databaseFilePath().isEmpty())
|
if (!multiLanguageAspect->databaseFilePath().isEmpty())
|
||||||
environment.set("QT_MULTILANGUAGE_DATABASE", multiLanguageAspect->databaseFilePath().toString());
|
environment.set("QT_MULTILANGUAGE_DATABASE", multiLanguageAspect->databaseFilePath().toString());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
customFileSelectors.append("DesignMode");
|
customFileSelectors.append("DesignMode");
|
||||||
|
@@ -10,6 +10,7 @@ include(../../qtcreatorplugin.pri)
|
|||||||
|
|
||||||
include(qmldesignerplugin.pri)
|
include(qmldesignerplugin.pri)
|
||||||
include(designercore/designercore-lib.pri)
|
include(designercore/designercore-lib.pri)
|
||||||
|
include(designercore/instances/instances.pri)
|
||||||
include(components/componentcore/componentcore.pri)
|
include(components/componentcore/componentcore.pri)
|
||||||
include(components/integration/integration.pri)
|
include(components/integration/integration.pri)
|
||||||
include(components/propertyeditor/propertyeditor.pri)
|
include(components/propertyeditor/propertyeditor.pri)
|
||||||
|
Reference in New Issue
Block a user