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 <QTimer>
|
||||
|
||||
#include <memory>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QLocalSocket;
|
||||
class QIODevice;
|
||||
|
@@ -7,7 +7,7 @@ DEFINES += DESIGNER_CORE_LIBRARY
|
||||
INCLUDEPATH += $$PWD \
|
||||
$$PWD/include
|
||||
|
||||
include (instances/instances.pri)
|
||||
include (instances/instances-lib.pri)
|
||||
include (../../../../share/qtcreator/qml/qmlpuppet/interfaces/interfaces.pri)
|
||||
include (../../../../share/qtcreator/qml/qmlpuppet/commands/commands.pri)
|
||||
include (../../../../share/qtcreator/qml/qmlpuppet/container/container.pri)
|
||||
|
@@ -41,7 +41,7 @@
|
||||
#include <QTime>
|
||||
#include <QtGui/qevent.h>
|
||||
|
||||
#include <memory.h>
|
||||
#include <memory>
|
||||
|
||||
namespace ProjectExplorer {
|
||||
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/
|
||||
|
||||
HEADERS += $$PWD/../include/nodeinstance.h \
|
||||
$$PWD/baseconnectionmanager.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
|
||||
HEADERS += $$PWD/capturingconnectionmanager.h \
|
||||
$$PWD/interactiveconnectionmanager.h
|
||||
|
||||
SOURCES += $$PWD/nodeinstanceserverproxy.cpp \
|
||||
$$PWD/baseconnectionmanager.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
|
||||
SOURCES += $$PWD/capturingconnectionmanager.cpp \
|
||||
$$PWD/interactiveconnectionmanager.cpp
|
||||
|
@@ -27,9 +27,7 @@
|
||||
#include "nodeinstanceserverproxy.h"
|
||||
#include "nodeinstanceview.h"
|
||||
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
#include <qmldesignerplugin.h>
|
||||
#endif
|
||||
|
||||
#include <coreplugin/messagebox.h>
|
||||
|
||||
@@ -51,7 +49,6 @@ void InteractiveConnectionManager::setUp(NodeInstanceServerProxy *nodeInstanceSe
|
||||
{
|
||||
ConnectionManager::setUp(nodeInstanceServerProxy, qrcMappingString, target);
|
||||
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
DesignerSettings settings = QmlDesignerPlugin::instance()->settings();
|
||||
int timeOutTime = settings.value(DesignerSettingsKey::PUPPET_KILL_TIMEOUT).toInt();
|
||||
for (Connection &connection : m_connections)
|
||||
@@ -68,7 +65,6 @@ void InteractiveConnectionManager::setUp(NodeInstanceServerProxy *nodeInstanceSe
|
||||
});
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void InteractiveConnectionManager::showCannotConnectToPuppetWarningAndSwitchToEditMode()
|
||||
@@ -78,11 +74,9 @@ void InteractiveConnectionManager::showCannotConnectToPuppetWarningAndSwitchToEd
|
||||
tr("The executable of the QML emulation layer (QML Puppet) may not be responding. "
|
||||
"Switching to another kit might help."));
|
||||
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
QmlDesignerPlugin::instance()->switchToTextModeDeferred();
|
||||
nodeInstanceServerProxy()->nodeInstanceView()->emitDocumentMessage(
|
||||
tr("Cannot Connect to QML Emulation Layer (QML Puppet)"));
|
||||
#endif
|
||||
}
|
||||
|
||||
void InteractiveConnectionManager::dispatchCommand(const QVariant &command, Connection &connection)
|
||||
|
@@ -83,11 +83,12 @@
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/documentmanager.h>
|
||||
#include <qmlprojectmanager/qmlmultilanguageaspect.h>
|
||||
#endif
|
||||
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <qmlprojectmanager/qmlmultilanguageaspect.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -551,10 +552,8 @@ void NodeInstanceView::auxiliaryDataChanged(const ModelNode &node,
|
||||
}
|
||||
} else if (node.isRootNode() && name == "language@Internal") {
|
||||
const QString languageAsString = value.toString();
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
if (auto multiLanguageAspect = QmlProjectManager::QmlMultiLanguageAspect::current(m_currentTarget))
|
||||
multiLanguageAspect->setCurrentLocale(languageAsString);
|
||||
#endif
|
||||
m_nodeInstanceServer->changeLanguage({languageAsString});
|
||||
} else if (node.isRootNode() && name == "previewSize@Internal") {
|
||||
m_nodeInstanceServer->changePreviewImageSize(value.toSize());
|
||||
@@ -993,10 +992,8 @@ CreateSceneCommand NodeInstanceView::createCreateSceneCommand()
|
||||
}
|
||||
|
||||
QString lastUsedLanguage;
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
if (auto multiLanguageAspect = QmlProjectManager::QmlMultiLanguageAspect::current(m_currentTarget))
|
||||
lastUsedLanguage = multiLanguageAspect->currentLocale();
|
||||
#endif
|
||||
|
||||
return CreateSceneCommand(
|
||||
instanceContainerList,
|
||||
|
@@ -30,7 +30,6 @@
|
||||
#include <model.h>
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
#include <qmldesignerplugin.h>
|
||||
#include <qmlprojectmanager/qmlmultilanguageaspect.h>
|
||||
#endif
|
||||
|
||||
#include <nodeinstanceview.h>
|
||||
@@ -46,6 +45,8 @@
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/toolchain.h>
|
||||
|
||||
#include <qmlprojectmanager/qmlmultilanguageaspect.h>
|
||||
|
||||
#include <qtsupport/baseqtversion.h>
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
#include <qtsupport/qtsupportconstants.h>
|
||||
@@ -520,12 +521,10 @@ QProcessEnvironment PuppetCreator::processEnvironment() const
|
||||
|
||||
customFileSelectors = m_target->additionalData("CustomFileSelectorsData").toStringList();
|
||||
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
if (auto multiLanguageAspect = QmlProjectManager::QmlMultiLanguageAspect::current(m_target)) {
|
||||
if (!multiLanguageAspect->databaseFilePath().isEmpty())
|
||||
environment.set("QT_MULTILANGUAGE_DATABASE", multiLanguageAspect->databaseFilePath().toString());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
customFileSelectors.append("DesignMode");
|
||||
|
@@ -10,6 +10,7 @@ include(../../qtcreatorplugin.pri)
|
||||
|
||||
include(qmldesignerplugin.pri)
|
||||
include(designercore/designercore-lib.pri)
|
||||
include(designercore/instances/instances.pri)
|
||||
include(components/componentcore/componentcore.pri)
|
||||
include(components/integration/integration.pri)
|
||||
include(components/propertyeditor/propertyeditor.pri)
|
||||
|
Reference in New Issue
Block a user