diff options
author | Marco Bubke <marco.bubke@qt.io> | 2020-04-28 11:21:03 +0200 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2020-04-29 06:17:34 +0000 |
commit | dacea667edb62aba586aeee199f9cfb9e08d7904 (patch) | |
tree | b1d20e79ab002b21ebcac04470ff4a37826b4b2e /share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp | |
parent | c10914204a1da9569d3419dbc4a4f79ba1d32b03 (diff) | |
download | qt-creator-dacea667edb62aba586aeee199f9cfb9e08d7904.tar.gz |
QmlDesigner: Add ChangeLanguage command
Change-Id: If79de7d04717ad81af05411e61c262b9ff70129b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp')
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp | 39 |
1 files changed, 24 insertions, 15 deletions
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<QVariant> 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<ChangeSelectionCommand>(); changeSelection(changeSelectionCommand); + } else if (command.userType() == changeLanguageCommand) { + changeLanguage(command.value<ChangeLanguageCommand>()); } else { Q_ASSERT(false); } |