forked from qt-creator/qt-creator
QmlDesigner: Fix compilation of coretests
Change-Id: Idd0c717078ac8d4fed9a8d4dfe000091ee2384c5 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -27,7 +27,9 @@
|
|||||||
#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>
|
||||||
|
|
||||||
@@ -49,6 +51,7 @@ 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)
|
||||||
@@ -65,6 +68,7 @@ void InteractiveConnectionManager::setUp(NodeInstanceServerProxy *nodeInstanceSe
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void InteractiveConnectionManager::showCannotConnectToPuppetWarningAndSwitchToEditMode()
|
void InteractiveConnectionManager::showCannotConnectToPuppetWarningAndSwitchToEditMode()
|
||||||
@@ -74,9 +78,11 @@ 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,12 +83,11 @@
|
|||||||
#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>
|
||||||
|
|
||||||
@@ -552,8 +551,10 @@ 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());
|
||||||
@@ -992,8 +993,10 @@ 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,6 +30,7 @@
|
|||||||
#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>
|
||||||
@@ -45,8 +46,6 @@
|
|||||||
#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>
|
||||||
@@ -521,10 +520,12 @@ 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");
|
||||||
|
Reference in New Issue
Block a user