From dacea667edb62aba586aeee199f9cfb9e08d7904 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Tue, 28 Apr 2020 11:21:03 +0200 Subject: QmlDesigner: Add ChangeLanguage command Change-Id: If79de7d04717ad81af05411e61c262b9ff70129b Reviewed-by: Thomas Hartmann Reviewed-by: Tim Jenssen --- .../instances/nodeinstanceclientproxy.cpp | 39 +++++++++++++--------- 1 file changed, 24 insertions(+), 15 deletions(-) (limited to 'share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp') diff --git a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp index 115bb5a90a..98409b57f4 100644 --- a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp +++ b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp @@ -35,28 +35,29 @@ #include "nodeinstanceserverinterface.h" -#include "propertyabstractcontainer.h" -#include "propertyvaluecontainer.h" -#include "propertybindingcontainer.h" -#include "instancecontainer.h" -#include "createinstancescommand.h" -#include "createscenecommand.h" -#include "update3dviewstatecommand.h" -#include "changevaluescommand.h" -#include "changebindingscommand.h" #include "changeauxiliarycommand.h" +#include "changebindingscommand.h" #include "changefileurlcommand.h" -#include "removeinstancescommand.h" -#include "clearscenecommand.h" -#include "removepropertiescommand.h" -#include "reparentinstancescommand.h" #include "changeidscommand.h" +#include "changelanguagecommand.h" #include "changestatecommand.h" +#include "changevaluescommand.h" +#include "clearscenecommand.h" #include "completecomponentcommand.h" -#include "synchronizecommand.h" +#include "createinstancescommand.h" +#include "createscenecommand.h" +#include "inputeventcommand.h" +#include "instancecontainer.h" +#include "propertyabstractcontainer.h" +#include "propertybindingcontainer.h" +#include "propertyvaluecontainer.h" +#include "removeinstancescommand.h" +#include "removepropertiescommand.h" #include "removesharedmemorycommand.h" +#include "reparentinstancescommand.h" +#include "synchronizecommand.h" #include "tokencommand.h" -#include "inputeventcommand.h" +#include "update3dviewstatecommand.h" #include "view3dactioncommand.h" #include "informationchangedcommand.h" @@ -324,6 +325,11 @@ void NodeInstanceClientProxy::view3DAction(const View3DActionCommand &command) nodeInstanceServer()->view3DAction(command); } +void NodeInstanceClientProxy::changeLanguage(const ChangeLanguageCommand &command) +{ + nodeInstanceServer()->changeLanguage(command); +} + void NodeInstanceClientProxy::readDataStream() { QList commandList; @@ -490,6 +496,7 @@ void NodeInstanceClientProxy::dispatchCommand(const QVariant &command) static const int changeSelectionCommandType = QMetaType::type("ChangeSelectionCommand"); static const int inputEventCommandType = QMetaType::type("InputEventCommand"); static const int view3DActionCommandType = QMetaType::type("View3DActionCommand"); + static const int changeLanguageCommand = QMetaType::type("ChangeLanguageCommand"); const int commandType = command.userType(); @@ -539,6 +546,8 @@ void NodeInstanceClientProxy::dispatchCommand(const QVariant &command) } else if (commandType == changeSelectionCommandType) { ChangeSelectionCommand changeSelectionCommand = command.value(); changeSelection(changeSelectionCommand); + } else if (command.userType() == changeLanguageCommand) { + changeLanguage(command.value()); } else { Q_ASSERT(false); } -- cgit v1.2.1