From 0ba2b9b37d745107926e13cf7e241c5351229966 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Tue, 16 Jul 2013 17:00:07 +0200 Subject: [PATCH] QmlDesigner: Add qdebugs for commands Change-Id: I60bdd5b36749be5092d4dabe486b101d62b3df06 Reviewed-by: Thomas Hartmann --- .../commands/changeauxiliarycommand.cpp | 7 ++++ .../commands/changeauxiliarycommand.h | 3 ++ .../commands/changebindingscommand.cpp | 8 +++++ .../commands/changebindingscommand.h | 3 ++ .../commands/changefileurlcommand.cpp | 8 +++++ .../qmlpuppet/commands/changefileurlcommand.h | 2 ++ .../qmlpuppet/commands/changeidscommand.cpp | 7 ++++ .../qml/qmlpuppet/commands/changeidscommand.h | 4 +++ .../commands/changenodesourcecommand.cpp | 8 +++++ .../commands/changenodesourcecommand.h | 4 +++ .../qmlpuppet/commands/changestatecommand.cpp | 7 ++++ .../qmlpuppet/commands/changestatecommand.h | 3 ++ .../commands/changevaluescommand.cpp | 7 ++++ .../qmlpuppet/commands/changevaluescommand.h | 3 ++ .../commands/childrenchangedcommand.cpp | 10 ++++++ .../commands/childrenchangedcommand.h | 1 + .../qmlpuppet/commands/clearscenecommand.cpp | 7 ++++ .../qmlpuppet/commands/clearscenecommand.h | 2 ++ .../commands/completecomponentcommand.cpp | 6 ++++ .../commands/completecomponentcommand.h | 3 ++ .../commands/componentcompletedcommand.cpp | 7 ++++ .../commands/componentcompletedcommand.h | 1 + .../commands/createinstancescommand.cpp | 6 ++++ .../commands/createinstancescommand.h | 2 ++ .../qmlpuppet/commands/createscenecommand.cpp | 15 +++++++++ .../qmlpuppet/commands/createscenecommand.h | 1 + .../qmlpuppet/commands/debugoutputcommand.cpp | 9 ++++++ .../qmlpuppet/commands/debugoutputcommand.h | 1 + .../qmlpuppet/commands/endpuppetcommand.cpp | 7 ++++ .../qml/qmlpuppet/commands/endpuppetcommand.h | 2 ++ .../commands/informationchangedcommand.cpp | 7 ++++ .../commands/informationchangedcommand.h | 2 +- .../commands/pixmapchangedcommand.cpp | 5 +++ .../qmlpuppet/commands/pixmapchangedcommand.h | 1 + .../commands/removeinstancescommand.cpp | 6 ++++ .../commands/removeinstancescommand.h | 3 ++ .../commands/removepropertiescommand.cpp | 7 ++++ .../commands/removepropertiescommand.h | 4 +++ .../commands/removesharedmemorycommand.cpp | 8 +++++ .../commands/removesharedmemorycommand.h | 3 ++ .../commands/reparentinstancescommand.cpp | 6 ++++ .../commands/reparentinstancescommand.h | 3 ++ .../statepreviewimagechangedcommand.cpp | 8 +++++ .../statepreviewimagechangedcommand.h | 1 + .../qmlpuppet/commands/synchronizecommand.cpp | 7 ++++ .../qmlpuppet/commands/synchronizecommand.h | 1 + .../qml/qmlpuppet/commands/tokencommand.cpp | 9 ++++++ .../qml/qmlpuppet/commands/tokencommand.h | 1 + .../commands/valueschangedcommand.cpp | 8 +++++ .../qmlpuppet/commands/valueschangedcommand.h | 2 +- .../container/addimportcontainer.cpp | 29 +++++++++++++++++ .../qmlpuppet/container/addimportcontainer.h | 2 ++ .../qml/qmlpuppet/container/idcontainer.cpp | 10 ++++++ .../qml/qmlpuppet/container/idcontainer.h | 2 ++ .../qmlpuppet/container/imagecontainer.cpp | 9 ++++++ .../qml/qmlpuppet/container/imagecontainer.h | 1 + .../container/informationcontainer.cpp | 18 +++++++++++ .../container/informationcontainer.h | 1 + .../qmlpuppet/container/instancecontainer.cpp | 32 +++++++++++++++++++ .../qmlpuppet/container/instancecontainer.h | 2 ++ .../container/propertyabstractcontainer.cpp | 17 ++++++++++ .../container/propertyabstractcontainer.h | 2 ++ .../container/propertybindingcontainer.cpp | 14 ++++++++ .../container/propertybindingcontainer.h | 2 ++ .../container/propertyvaluecontainer.cpp | 14 ++++++++ .../container/propertyvaluecontainer.h | 1 + .../qmlpuppet/container/reparentcontainer.cpp | 21 ++++++++++++ .../qmlpuppet/container/reparentcontainer.h | 2 ++ .../instances/nodeinstanceclientproxy.cpp | 6 ++-- .../instances/nodeinstanceserver.cpp | 1 + 70 files changed, 427 insertions(+), 5 deletions(-) diff --git a/share/qtcreator/qml/qmlpuppet/commands/changeauxiliarycommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/changeauxiliarycommand.cpp index 286d520db9c..494881f668a 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changeauxiliarycommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/changeauxiliarycommand.cpp @@ -29,6 +29,8 @@ #include "changeauxiliarycommand.h" +#include + namespace QmlDesigner { ChangeAuxiliaryCommand::ChangeAuxiliaryCommand() @@ -59,4 +61,9 @@ QDataStream &operator>>(QDataStream &in, ChangeAuxiliaryCommand &command) return in; } +QDebug operator <<(QDebug debug, const ChangeAuxiliaryCommand &command) +{ + return debug.nospace() << "ChangeAuxiliaryCommand(auxiliaryChanges: " << command.m_auxiliaryChangeVector << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/changeauxiliarycommand.h b/share/qtcreator/qml/qmlpuppet/commands/changeauxiliarycommand.h index 4be981f1e98..90a3c3f5b96 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changeauxiliarycommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/changeauxiliarycommand.h @@ -40,6 +40,7 @@ namespace QmlDesigner { class ChangeAuxiliaryCommand { friend QDataStream &operator>>(QDataStream &in, ChangeAuxiliaryCommand &command); + friend QDebug operator <<(QDebug debug, const ChangeAuxiliaryCommand &command); public: ChangeAuxiliaryCommand(); @@ -54,6 +55,8 @@ private: QDataStream &operator<<(QDataStream &out, const ChangeAuxiliaryCommand &command); QDataStream &operator>>(QDataStream &in, ChangeAuxiliaryCommand &command); +QDebug operator <<(QDebug debug, const ChangeAuxiliaryCommand &command); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ChangeAuxiliaryCommand) diff --git a/share/qtcreator/qml/qmlpuppet/commands/changebindingscommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/changebindingscommand.cpp index 88a0bb76b7b..9192b6cfcea 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changebindingscommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/changebindingscommand.cpp @@ -29,6 +29,8 @@ #include "changebindingscommand.h" +#include + namespace QmlDesigner { ChangeBindingsCommand::ChangeBindingsCommand() @@ -58,4 +60,10 @@ QDataStream &operator>>(QDataStream &in, ChangeBindingsCommand &command) return in; } + +QDebug operator <<(QDebug debug, const ChangeBindingsCommand &command) +{ + return debug.nospace() << "PropertyValueContainer(bindingChanges: " << command.m_bindingChangeVector << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/changebindingscommand.h b/share/qtcreator/qml/qmlpuppet/commands/changebindingscommand.h index 733bc3b3bb1..648be83b6b5 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changebindingscommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/changebindingscommand.h @@ -40,6 +40,7 @@ namespace QmlDesigner { class ChangeBindingsCommand { friend QDataStream &operator>>(QDataStream &in, ChangeBindingsCommand &command); + friend QDebug operator <<(QDebug debug, const ChangeBindingsCommand &command); public: ChangeBindingsCommand(); @@ -54,6 +55,8 @@ private: QDataStream &operator<<(QDataStream &out, const ChangeBindingsCommand &command); QDataStream &operator>>(QDataStream &in, ChangeBindingsCommand &command); +QDebug operator <<(QDebug debug, const ChangeBindingsCommand &command); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ChangeBindingsCommand) diff --git a/share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.cpp index a562ff2cdf2..4a1d90b52a1 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.cpp @@ -28,7 +28,9 @@ ****************************************************************************/ #include "changefileurlcommand.h" + #include +#include namespace QmlDesigner { @@ -60,4 +62,10 @@ QDataStream &operator>>(QDataStream &in, ChangeFileUrlCommand &command) return in; } +QDebug operator <<(QDebug debug, const ChangeFileUrlCommand &command) +{ + return debug.nospace() << "ChangeFileUrlCommand(" + << "fileUrl: " << command.fileUrl() << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.h b/share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.h index 1d96fbfb02f..8cb8615351e 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.h @@ -52,6 +52,8 @@ private: QDataStream &operator<<(QDataStream &out, const ChangeFileUrlCommand &command); QDataStream &operator>>(QDataStream &in, ChangeFileUrlCommand &command); +QDebug operator <<(QDebug debug, const ChangeFileUrlCommand &command); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ChangeFileUrlCommand) diff --git a/share/qtcreator/qml/qmlpuppet/commands/changeidscommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/changeidscommand.cpp index eb55f28eaa5..200c57203a6 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changeidscommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/changeidscommand.cpp @@ -29,6 +29,8 @@ #include "changeidscommand.h" +#include + namespace QmlDesigner { ChangeIdsCommand::ChangeIdsCommand() @@ -59,4 +61,9 @@ QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command) return in; } +QDebug operator <<(QDebug debug, const ChangeIdsCommand &command) +{ + return debug.nospace() << "ChangeIdsCommand(ids: " << command.m_idVector << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/changeidscommand.h b/share/qtcreator/qml/qmlpuppet/commands/changeidscommand.h index c90311d1d3f..287a6860df1 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changeidscommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/changeidscommand.h @@ -41,6 +41,8 @@ namespace QmlDesigner { class ChangeIdsCommand { friend QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command); + friend QDebug operator <<(QDebug debug, const ChangeIdsCommand &command); + public: ChangeIdsCommand(); explicit ChangeIdsCommand(const QVector &idVector); @@ -54,6 +56,8 @@ private: QDataStream &operator<<(QDataStream &out, const ChangeIdsCommand &command); QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command); +QDebug operator <<(QDebug debug, const ChangeIdsCommand &command); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ChangeIdsCommand) diff --git a/share/qtcreator/qml/qmlpuppet/commands/changenodesourcecommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/changenodesourcecommand.cpp index c106815e266..6b2d9158cde 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changenodesourcecommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/changenodesourcecommand.cpp @@ -30,6 +30,7 @@ #include "changenodesourcecommand.h" #include +#include namespace QmlDesigner { @@ -68,4 +69,11 @@ QDataStream &operator>>(QDataStream &in, ChangeNodeSourceCommand &command) return in; } +QDebug operator <<(QDebug debug, const ChangeNodeSourceCommand &command) +{ + return debug.nospace() << "ReparentInstancesCommand(" + << "instanceId: " << command.m_instanceId + << "nodeSource: " << command.m_nodeSource << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/changenodesourcecommand.h b/share/qtcreator/qml/qmlpuppet/commands/changenodesourcecommand.h index 1ed45cd0486..3de4d114cfa 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changenodesourcecommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/changenodesourcecommand.h @@ -39,6 +39,8 @@ namespace QmlDesigner { class ChangeNodeSourceCommand { friend QDataStream &operator>>(QDataStream &in, ChangeNodeSourceCommand &command); + friend QDebug operator <<(QDebug debug, const ChangeNodeSourceCommand &command); + public: ChangeNodeSourceCommand(); explicit ChangeNodeSourceCommand(qint32 instanceId, const QString &nodeSource); @@ -53,6 +55,8 @@ private: QDataStream &operator<<(QDataStream &out, const ChangeNodeSourceCommand &command); QDataStream &operator>>(QDataStream &in, ChangeNodeSourceCommand &command); +QDebug operator <<(QDebug debug, const ChangeNodeSourceCommand &command); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ChangeNodeSourceCommand) diff --git a/share/qtcreator/qml/qmlpuppet/commands/changestatecommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/changestatecommand.cpp index 3ac36fd8458..b3418fefc28 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changestatecommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/changestatecommand.cpp @@ -29,6 +29,8 @@ #include "changestatecommand.h" +#include + namespace QmlDesigner { ChangeStateCommand::ChangeStateCommand() @@ -60,4 +62,9 @@ QDataStream &operator>>(QDataStream &in, ChangeStateCommand &command) return in; } +QDebug operator <<(QDebug debug, const ChangeStateCommand &command) +{ + return debug.nospace() << "ChangeStateCommand(stateInstanceId: " << command.m_stateInstanceId << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/changestatecommand.h b/share/qtcreator/qml/qmlpuppet/commands/changestatecommand.h index 5924399a640..24356caf9d1 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changestatecommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/changestatecommand.h @@ -40,6 +40,7 @@ namespace QmlDesigner { class ChangeStateCommand { friend QDataStream &operator>>(QDataStream &in, ChangeStateCommand &command); + friend QDebug operator <<(QDebug debug, const ChangeStateCommand &command); public: ChangeStateCommand(); @@ -54,6 +55,8 @@ private: QDataStream &operator<<(QDataStream &out, const ChangeStateCommand &command); QDataStream &operator>>(QDataStream &in, ChangeStateCommand &command); +QDebug operator <<(QDebug debug, const ChangeStateCommand &command); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ChangeStateCommand) diff --git a/share/qtcreator/qml/qmlpuppet/commands/changevaluescommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/changevaluescommand.cpp index 5439ff3fe98..d87afcac5b2 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changevaluescommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/changevaluescommand.cpp @@ -29,6 +29,8 @@ #include "changevaluescommand.h" +#include + namespace QmlDesigner { ChangeValuesCommand::ChangeValuesCommand() @@ -59,4 +61,9 @@ QDataStream &operator>>(QDataStream &in, ChangeValuesCommand &command) return in; } +QDebug operator <<(QDebug debug, const ChangeValuesCommand &command) +{ + return debug.nospace() << "ChangeValuesCommand(valueChanges: " << command.m_valueChangeVector << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/changevaluescommand.h b/share/qtcreator/qml/qmlpuppet/commands/changevaluescommand.h index 9d0eb3c63e0..f5e56767dfc 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changevaluescommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/changevaluescommand.h @@ -40,6 +40,7 @@ namespace QmlDesigner { class ChangeValuesCommand { friend QDataStream &operator>>(QDataStream &in, ChangeValuesCommand &command); + friend QDebug operator <<(QDebug debug, const ChangeValuesCommand &command); public: ChangeValuesCommand(); @@ -54,6 +55,8 @@ private: QDataStream &operator<<(QDataStream &out, const ChangeValuesCommand &command); QDataStream &operator>>(QDataStream &in, ChangeValuesCommand &command); +QDebug operator <<(QDebug debug, const ChangeValuesCommand &command); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ChangeValuesCommand) diff --git a/share/qtcreator/qml/qmlpuppet/commands/childrenchangedcommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/childrenchangedcommand.cpp index 3d9f9096f2b..3cf00d4993c 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/childrenchangedcommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/childrenchangedcommand.cpp @@ -29,6 +29,8 @@ #include "childrenchangedcommand.h" +#include + namespace QmlDesigner { ChildrenChangedCommand::ChildrenChangedCommand() @@ -88,4 +90,12 @@ bool operator ==(const ChildrenChangedCommand &first, const ChildrenChangedComma && first.m_informationVector == second.m_informationVector; } +QDebug operator <<(QDebug debug, const ChildrenChangedCommand &command) +{ + return debug.nospace() << "ChildrenChangedCommand(" + << "parentInstanceId: " << command.parentInstanceId() << ", " + << "children: " << command.childrenInstances() << ", " + << "informations: " << command.informations() << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/childrenchangedcommand.h b/share/qtcreator/qml/qmlpuppet/commands/childrenchangedcommand.h index a4e1804050b..7a19ddc73cd 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/childrenchangedcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/childrenchangedcommand.h @@ -61,6 +61,7 @@ QDataStream &operator<<(QDataStream &out, const ChildrenChangedCommand &command) QDataStream &operator>>(QDataStream &in, ChildrenChangedCommand &command); bool operator ==(const ChildrenChangedCommand &first, const ChildrenChangedCommand &second); +QDebug operator <<(QDebug debug, const ChildrenChangedCommand &command); } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/clearscenecommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/clearscenecommand.cpp index 00ff37b46f5..b2e71344aa5 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/clearscenecommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/clearscenecommand.cpp @@ -29,6 +29,8 @@ #include "clearscenecommand.h" +#include + namespace QmlDesigner { ClearSceneCommand::ClearSceneCommand() @@ -45,4 +47,9 @@ QDataStream &operator>>(QDataStream &in, ClearSceneCommand &/*command*/) return in; } +QDebug operator <<(QDebug debug, const ClearSceneCommand &/*command*/) +{ + return debug.nospace() << "ClearSceneCommand()"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/clearscenecommand.h b/share/qtcreator/qml/qmlpuppet/commands/clearscenecommand.h index 69e21de2e15..4251179eb5b 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/clearscenecommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/clearscenecommand.h @@ -43,6 +43,8 @@ public: QDataStream &operator<<(QDataStream &out, const ClearSceneCommand &command); QDataStream &operator>>(QDataStream &in, ClearSceneCommand &command); +QDebug operator <<(QDebug debug, const ClearSceneCommand &command); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ClearSceneCommand) diff --git a/share/qtcreator/qml/qmlpuppet/commands/completecomponentcommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/completecomponentcommand.cpp index 124ab897fe6..b8d5eee1121 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/completecomponentcommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/completecomponentcommand.cpp @@ -30,6 +30,7 @@ #include "completecomponentcommand.h" #include +#include namespace QmlDesigner { @@ -61,4 +62,9 @@ QDataStream &operator>>(QDataStream &in, CompleteComponentCommand &command) return in; } +QDebug operator <<(QDebug debug, const CompleteComponentCommand &command) +{ + return debug.nospace() << "CompleteComponentCommand(instances: " << command.m_instanceVector << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/completecomponentcommand.h b/share/qtcreator/qml/qmlpuppet/commands/completecomponentcommand.h index 5824c4c0344..ac83fbb643e 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/completecomponentcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/completecomponentcommand.h @@ -39,6 +39,7 @@ namespace QmlDesigner { class CompleteComponentCommand { friend QDataStream &operator>>(QDataStream &in, CompleteComponentCommand &command); + friend QDebug operator <<(QDebug debug, const CompleteComponentCommand &command); public: CompleteComponentCommand(); @@ -53,6 +54,8 @@ private: QDataStream &operator<<(QDataStream &out, const CompleteComponentCommand &command); QDataStream &operator>>(QDataStream &in, CompleteComponentCommand &command); +QDebug operator <<(QDebug debug, const CompleteComponentCommand &command); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::CompleteComponentCommand) diff --git a/share/qtcreator/qml/qmlpuppet/commands/componentcompletedcommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/componentcompletedcommand.cpp index ac54f3b9643..7db21440eed 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/componentcompletedcommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/componentcompletedcommand.cpp @@ -30,6 +30,7 @@ #include "componentcompletedcommand.h" #include +#include namespace QmlDesigner { @@ -71,5 +72,11 @@ bool operator ==(const ComponentCompletedCommand &first, const ComponentComplete return first.m_instanceVector == second.m_instanceVector; } +QDebug operator <<(QDebug debug, const ComponentCompletedCommand &command) +{ + return debug.nospace() << "ComponentCompletedCommand(" << command.instances() << ")"; + +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/componentcompletedcommand.h b/share/qtcreator/qml/qmlpuppet/commands/componentcompletedcommand.h index 6b65c61c8d0..e7e57c07d54 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/componentcompletedcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/componentcompletedcommand.h @@ -56,6 +56,7 @@ QDataStream &operator<<(QDataStream &out, const ComponentCompletedCommand &comma QDataStream &operator>>(QDataStream &in, ComponentCompletedCommand &command); bool operator ==(const ComponentCompletedCommand &first, const ComponentCompletedCommand &second); +QDebug operator <<(QDebug debug, const ComponentCompletedCommand &command); } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/createinstancescommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/createinstancescommand.cpp index f65d2c1b667..497c1140f89 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/createinstancescommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/createinstancescommand.cpp @@ -30,6 +30,7 @@ #include "createinstancescommand.h" #include +#include namespace QmlDesigner { @@ -61,4 +62,9 @@ QDataStream &operator>>(QDataStream &in, CreateInstancesCommand &command) return in; } +QDebug operator <<(QDebug debug, const CreateInstancesCommand &command) +{ + return debug.nospace() << "CreateInstancesCommand(" << command.instances() << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/createinstancescommand.h b/share/qtcreator/qml/qmlpuppet/commands/createinstancescommand.h index e85c3560cc1..a0120bb2d45 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/createinstancescommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/createinstancescommand.h @@ -54,6 +54,8 @@ private: QDataStream &operator<<(QDataStream &out, const CreateInstancesCommand &command); QDataStream &operator>>(QDataStream &in, CreateInstancesCommand &command); +QDebug operator <<(QDebug debug, const CreateInstancesCommand &command); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::CreateInstancesCommand) diff --git a/share/qtcreator/qml/qmlpuppet/commands/createscenecommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/createscenecommand.cpp index 8f471400e18..87bad4b54c9 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/createscenecommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/createscenecommand.cpp @@ -29,6 +29,8 @@ #include "createscenecommand.h" +#include + namespace QmlDesigner { CreateSceneCommand::CreateSceneCommand() @@ -122,4 +124,17 @@ QDataStream &operator>>(QDataStream &in, CreateSceneCommand &command) return in; } +QDebug operator <<(QDebug debug, const CreateSceneCommand &command) +{ + return debug.nospace() << "CreateSceneCommand(" + << "instances: " << command.instances() << ", " + << "reparentInstances: " << command.reparentInstances() << ", " + << "ids: " << command.ids() << ", " + << "valueChanges: " << command.valueChanges() << ", " + << "bindingChanges: " << command.bindingChanges() << ", " + << "auxiliaryChanges: " << command.auxiliaryChanges() << ", " + << "imports: " << command.imports() << ", " + << "fileUrl: " << command.fileUrl() << ")"; +} + } diff --git a/share/qtcreator/qml/qmlpuppet/commands/createscenecommand.h b/share/qtcreator/qml/qmlpuppet/commands/createscenecommand.h index 1244fcfcbe7..30e7ecd0ee1 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/createscenecommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/createscenecommand.h @@ -81,6 +81,7 @@ private: QDataStream &operator<<(QDataStream &out, const CreateSceneCommand &command); QDataStream &operator>>(QDataStream &in, CreateSceneCommand &command); +QDebug operator <<(QDebug debug, const CreateSceneCommand &command); } Q_DECLARE_METATYPE(QmlDesigner::CreateSceneCommand) diff --git a/share/qtcreator/qml/qmlpuppet/commands/debugoutputcommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/debugoutputcommand.cpp index dcfb7a53446..2d4077744b1 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/debugoutputcommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/debugoutputcommand.cpp @@ -30,6 +30,8 @@ #include "debugoutputcommand.h" +#include + namespace QmlDesigner { DebugOutputCommand::DebugOutputCommand() @@ -74,4 +76,11 @@ bool operator ==(const DebugOutputCommand &first, const DebugOutputCommand &seco && second.m_text == second.m_text; } +QDebug operator <<(QDebug debug, const DebugOutputCommand &command) +{ + return debug.nospace() << "DebugOutputCommand(" + << "type: " << command.type() << ", " + << "text: " << command.text() << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/debugoutputcommand.h b/share/qtcreator/qml/qmlpuppet/commands/debugoutputcommand.h index 3cd6e006d89..b4862bed892 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/debugoutputcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/debugoutputcommand.h @@ -64,6 +64,7 @@ QDataStream &operator<<(QDataStream &out, const DebugOutputCommand &command); QDataStream &operator>>(QDataStream &in, DebugOutputCommand &command); bool operator ==(const DebugOutputCommand &first, const DebugOutputCommand &second); +QDebug operator <<(QDebug debug, const DebugOutputCommand &command); } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp index 2a910880eb5..ada088a1c1f 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp @@ -29,6 +29,8 @@ #include "endpuppetcommand.h" +#include + namespace QmlDesigner { EndPuppetCommand::EndPuppetCommand() @@ -45,4 +47,9 @@ QDataStream &operator>>(QDataStream &in, EndPuppetCommand &/*command*/) return in; } +QDebug operator <<(QDebug debug, const EndPuppetCommand &/*command*/) +{ + return debug.nospace() << "EndPuppetCommand()"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h b/share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h index eb0ce6e3f55..761951a065c 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h @@ -42,6 +42,8 @@ public: QDataStream &operator<<(QDataStream &out, const EndPuppetCommand &command); QDataStream &operator>>(QDataStream &in, EndPuppetCommand &command); +QDebug operator <<(QDebug debug, const EndPuppetCommand &command); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::EndPuppetCommand) diff --git a/share/qtcreator/qml/qmlpuppet/commands/informationchangedcommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/informationchangedcommand.cpp index b32afd7b029..420e80e26ac 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/informationchangedcommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/informationchangedcommand.cpp @@ -30,6 +30,7 @@ #include "informationchangedcommand.h" #include +#include #include "propertyvaluecontainer.h" @@ -73,4 +74,10 @@ bool operator ==(const InformationChangedCommand &first, const InformationChange return first.m_informationVector == second.m_informationVector; } +QDebug operator <<(QDebug debug, const InformationChangedCommand &command) +{ + return debug.nospace() << "InformationChangedCommand(" << command.informations() << ")"; +} + + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/informationchangedcommand.h b/share/qtcreator/qml/qmlpuppet/commands/informationchangedcommand.h index 1a61807b702..933ff2ac578 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/informationchangedcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/informationchangedcommand.h @@ -32,7 +32,6 @@ #include #include -#include #include "informationcontainer.h" @@ -59,6 +58,7 @@ QDataStream &operator<<(QDataStream &out, const InformationChangedCommand &comma QDataStream &operator>>(QDataStream &in, InformationChangedCommand &command); bool operator ==(const InformationChangedCommand &first, const InformationChangedCommand &second); +QDebug operator <<(QDebug debug, const InformationChangedCommand &command); } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/pixmapchangedcommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/pixmapchangedcommand.cpp index 6dc0d133916..5105f0a7346 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/pixmapchangedcommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/pixmapchangedcommand.cpp @@ -73,4 +73,9 @@ bool operator ==(const PixmapChangedCommand &first, const PixmapChangedCommand & return first.m_imageVector == second.m_imageVector; } +QDebug operator <<(QDebug debug, const PixmapChangedCommand &command) +{ + return debug.nospace() << "PixmapChangedCommand(" << command.images() << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/pixmapchangedcommand.h b/share/qtcreator/qml/qmlpuppet/commands/pixmapchangedcommand.h index 65eca7665dd..3d35e91c99f 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/pixmapchangedcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/pixmapchangedcommand.h @@ -56,6 +56,7 @@ QDataStream &operator<<(QDataStream &out, const PixmapChangedCommand &command); QDataStream &operator>>(QDataStream &in, PixmapChangedCommand &command); bool operator ==(const PixmapChangedCommand &first, const PixmapChangedCommand &second); +QDebug operator <<(QDebug debug, const PixmapChangedCommand &command); } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/removeinstancescommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/removeinstancescommand.cpp index e256d7ae45b..619e71845ad 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/removeinstancescommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/removeinstancescommand.cpp @@ -30,6 +30,7 @@ #include "removeinstancescommand.h" #include +#include namespace QmlDesigner { @@ -61,4 +62,9 @@ QDataStream &operator>>(QDataStream &in, RemoveInstancesCommand &command) return in; } +QDebug operator <<(QDebug debug, const RemoveInstancesCommand &command) +{ + return debug.nospace() << "RemoveInstancesCommand(instanceIdVector: " << command.m_instanceIdVector << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/removeinstancescommand.h b/share/qtcreator/qml/qmlpuppet/commands/removeinstancescommand.h index 1d6ca4d5409..561b3494751 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/removeinstancescommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/removeinstancescommand.h @@ -41,6 +41,7 @@ namespace QmlDesigner { class RemoveInstancesCommand { friend QDataStream &operator>>(QDataStream &in, RemoveInstancesCommand &command); + friend QDebug operator <<(QDebug debug, const RemoveInstancesCommand &command); public: RemoveInstancesCommand(); @@ -55,6 +56,8 @@ private: QDataStream &operator<<(QDataStream &out, const RemoveInstancesCommand &command); QDataStream &operator>>(QDataStream &in, RemoveInstancesCommand &command); +QDebug operator <<(QDebug debug, const RemoveInstancesCommand &command); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::RemoveInstancesCommand) diff --git a/share/qtcreator/qml/qmlpuppet/commands/removepropertiescommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/removepropertiescommand.cpp index 021c0616e77..3a3c73d146f 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/removepropertiescommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/removepropertiescommand.cpp @@ -29,6 +29,8 @@ #include "removepropertiescommand.h" +#include + namespace QmlDesigner { RemovePropertiesCommand::RemovePropertiesCommand() @@ -59,4 +61,9 @@ QDataStream &operator>>(QDataStream &in, RemovePropertiesCommand &command) return in; } +QDebug operator <<(QDebug debug, const RemovePropertiesCommand &command) +{ + return debug.nospace() << "RemovePropertiesCommand(properties: " << command.m_properties << ")"; +} + } diff --git a/share/qtcreator/qml/qmlpuppet/commands/removepropertiescommand.h b/share/qtcreator/qml/qmlpuppet/commands/removepropertiescommand.h index a7410eaeea4..667170f9d62 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/removepropertiescommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/removepropertiescommand.h @@ -40,6 +40,8 @@ namespace QmlDesigner { class RemovePropertiesCommand { friend QDataStream &operator>>(QDataStream &in, RemovePropertiesCommand &command); + friend QDebug operator <<(QDebug debug, const RemovePropertiesCommand &command); + public: RemovePropertiesCommand(); explicit RemovePropertiesCommand(const QVector &properties); @@ -53,6 +55,8 @@ private: QDataStream &operator<<(QDataStream &out, const RemovePropertiesCommand &command); QDataStream &operator>>(QDataStream &in, RemovePropertiesCommand &command); +QDebug operator <<(QDebug debug, const RemovePropertiesCommand &command); + } Q_DECLARE_METATYPE(QmlDesigner::RemovePropertiesCommand) diff --git a/share/qtcreator/qml/qmlpuppet/commands/removesharedmemorycommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/removesharedmemorycommand.cpp index da6944d2292..51bd3635489 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/removesharedmemorycommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/removesharedmemorycommand.cpp @@ -31,6 +31,7 @@ #include "removesharedmemorycommand.h" #include +#include namespace QmlDesigner { @@ -70,4 +71,11 @@ QDataStream &operator>>(QDataStream &in, RemoveSharedMemoryCommand &command) return in; } +QDebug operator <<(QDebug debug, const RemoveSharedMemoryCommand &command) +{ + return debug.nospace() << "RemoveSharedMemoryCommand(" + << "typeName: " << command.m_typeName + << "keyNumbers: " << command.m_keyNumberVector << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/removesharedmemorycommand.h b/share/qtcreator/qml/qmlpuppet/commands/removesharedmemorycommand.h index 75b6efe5384..c342ba8df9b 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/removesharedmemorycommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/removesharedmemorycommand.h @@ -40,6 +40,7 @@ namespace QmlDesigner { class RemoveSharedMemoryCommand { friend QDataStream &operator>>(QDataStream &in, RemoveSharedMemoryCommand &command); + friend QDebug operator <<(QDebug debug, const RemoveSharedMemoryCommand &command); public: RemoveSharedMemoryCommand(); @@ -56,6 +57,8 @@ private: QDataStream &operator<<(QDataStream &out, const RemoveSharedMemoryCommand &command); QDataStream &operator>>(QDataStream &in, RemoveSharedMemoryCommand &command); +QDebug operator <<(QDebug debug, const RemoveSharedMemoryCommand &command); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::RemoveSharedMemoryCommand) diff --git a/share/qtcreator/qml/qmlpuppet/commands/reparentinstancescommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/reparentinstancescommand.cpp index faac957fec3..7713c214d45 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/reparentinstancescommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/reparentinstancescommand.cpp @@ -30,6 +30,7 @@ #include "reparentinstancescommand.h" #include +#include namespace QmlDesigner { @@ -62,4 +63,9 @@ QDataStream &operator>>(QDataStream &in, ReparentInstancesCommand &command) return in; } +QDebug operator <<(QDebug debug, const ReparentInstancesCommand &command) +{ + return debug.nospace() << "ReparentInstancesCommand(reparentInstances: " << command.m_reparentInstanceVector << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/reparentinstancescommand.h b/share/qtcreator/qml/qmlpuppet/commands/reparentinstancescommand.h index 68e8d7a6729..47cec46d8e4 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/reparentinstancescommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/reparentinstancescommand.h @@ -40,6 +40,7 @@ namespace QmlDesigner { class ReparentInstancesCommand { friend QDataStream &operator>>(QDataStream &in, ReparentInstancesCommand &command); + friend QDebug operator <<(QDebug debug, const ReparentInstancesCommand &command); public: ReparentInstancesCommand(); @@ -54,6 +55,8 @@ private: QDataStream &operator<<(QDataStream &out, const ReparentInstancesCommand &command); QDataStream &operator>>(QDataStream &in, ReparentInstancesCommand &command); +QDebug operator <<(QDebug debug, const ReparentInstancesCommand &command); + } // Q_DECLARE_METATYPE(QmlDesigner::ReparentInstancesCommand) diff --git a/share/qtcreator/qml/qmlpuppet/commands/statepreviewimagechangedcommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/statepreviewimagechangedcommand.cpp index 4129e2191d0..edc0dcfd161 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/statepreviewimagechangedcommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/statepreviewimagechangedcommand.cpp @@ -29,6 +29,8 @@ #include "statepreviewimagechangedcommand.h" +#include + namespace QmlDesigner { StatePreviewImageChangedCommand::StatePreviewImageChangedCommand() @@ -69,4 +71,10 @@ bool operator ==(const StatePreviewImageChangedCommand &first, const StatePrevie return first.m_previewVector == second.m_previewVector; } +QDebug operator <<(QDebug debug, const StatePreviewImageChangedCommand &command) +{ + return debug.nospace() << "StatePreviewImageChangedCommand(" << command.previews() << ")"; + +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/statepreviewimagechangedcommand.h b/share/qtcreator/qml/qmlpuppet/commands/statepreviewimagechangedcommand.h index bf31f588d63..2e85ec44b8d 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/statepreviewimagechangedcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/statepreviewimagechangedcommand.h @@ -57,6 +57,7 @@ QDataStream &operator<<(QDataStream &out, const StatePreviewImageChangedCommand QDataStream &operator>>(QDataStream &in, StatePreviewImageChangedCommand &command); bool operator ==(const StatePreviewImageChangedCommand &first, const StatePreviewImageChangedCommand &second); +QDebug operator <<(QDebug debug, const StatePreviewImageChangedCommand &command); } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/synchronizecommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/synchronizecommand.cpp index 5307798e142..809537fe847 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/synchronizecommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/synchronizecommand.cpp @@ -29,6 +29,8 @@ #include "synchronizecommand.h" +#include + namespace QmlDesigner { SynchronizeCommand::SynchronizeCommand() @@ -66,4 +68,9 @@ bool operator ==(const SynchronizeCommand &first, const SynchronizeCommand &seco return first.m_synchronizeId == second.m_synchronizeId; } +QDebug operator <<(QDebug debug, const SynchronizeCommand &command) +{ + return debug.nospace() << "SynchronizeCommand(synchronizeId: " << command.synchronizeId() << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/synchronizecommand.h b/share/qtcreator/qml/qmlpuppet/commands/synchronizecommand.h index fd4d9904dfb..3c4a7716c39 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/synchronizecommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/synchronizecommand.h @@ -56,6 +56,7 @@ QDataStream &operator<<(QDataStream &out, const SynchronizeCommand &command); QDataStream &operator>>(QDataStream &in, SynchronizeCommand &command); bool operator ==(const SynchronizeCommand &first, const SynchronizeCommand &second); +QDebug operator <<(QDebug debug, const SynchronizeCommand &command); } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/tokencommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/tokencommand.cpp index 91abc7a2450..de8ce77e7e1 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/tokencommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/tokencommand.cpp @@ -30,6 +30,7 @@ #include "tokencommand.h" #include +#include namespace QmlDesigner { @@ -89,4 +90,12 @@ bool operator ==(const TokenCommand &first, const TokenCommand &second) && first.m_instanceIdVector == second.m_instanceIdVector; } +QDebug operator <<(QDebug debug, const TokenCommand &command) +{ + return debug.nospace() << "TokenCommand(" + << "tokenName: " << command.tokenName() << ", " + << "tokenNumber: " << command.tokenNumber() << ", " + << "instances: " << command.instances() << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/tokencommand.h b/share/qtcreator/qml/qmlpuppet/commands/tokencommand.h index bf42b809ca9..e82b805792c 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/tokencommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/tokencommand.h @@ -63,6 +63,7 @@ QDataStream &operator<<(QDataStream &out, const TokenCommand &command); QDataStream &operator>>(QDataStream &in, TokenCommand &command); bool operator ==(const TokenCommand &first, const TokenCommand &second); +QDebug operator <<(QDebug debug, const TokenCommand &command); } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.cpp index 71e07d55da7..a5a9a4db2a4 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.cpp @@ -31,6 +31,7 @@ #include #include +#include #include @@ -152,4 +153,11 @@ bool operator ==(const ValuesChangedCommand &first, const ValuesChangedCommand & return first.m_valueChangeVector == second.m_valueChangeVector; } +QDebug operator <<(QDebug debug, const ValuesChangedCommand &command) +{ + return debug.nospace() << "ValuesChangedCommand(" + << "keyNumber: " << command.keyNumber() << ", " + << command.valueChanges() << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.h b/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.h index 9689c7d446b..e618a1ef40e 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.h @@ -63,7 +63,7 @@ QDataStream &operator<<(QDataStream &out, const ValuesChangedCommand &command); QDataStream &operator>>(QDataStream &in, ValuesChangedCommand &command); bool operator ==(const ValuesChangedCommand &first, const ValuesChangedCommand &second); - +QDebug operator <<(QDebug debug, const ValuesChangedCommand &instance); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ValuesChangedCommand) diff --git a/share/qtcreator/qml/qmlpuppet/container/addimportcontainer.cpp b/share/qtcreator/qml/qmlpuppet/container/addimportcontainer.cpp index 825387053cf..52313953249 100644 --- a/share/qtcreator/qml/qmlpuppet/container/addimportcontainer.cpp +++ b/share/qtcreator/qml/qmlpuppet/container/addimportcontainer.cpp @@ -29,6 +29,8 @@ #include "addimportcontainer.h" +#include + namespace QmlDesigner { AddImportContainer::AddImportContainer() @@ -91,4 +93,31 @@ QDataStream &operator>>(QDataStream &in, AddImportContainer &command) return in; } +QDebug operator <<(QDebug debug, const AddImportContainer &container) +{ + debug.nospace() << "AddImportContainer("; + + if (!container.url().isEmpty()) + debug.nospace() << "url: " << container.url() << ", "; + + if (!container.fileName().isEmpty()) + debug.nospace() << "fileName: " << container.fileName() << ", "; + + if (!container.version().isEmpty()) + debug.nospace() << "version: " << container.version() << ", "; + + if (!container.alias().isEmpty()) + debug.nospace() << "alias: " << container.alias() << ", "; + + if (!container.alias().isEmpty()) + debug.nospace() << "alias: " << container.alias() << ", "; + + if (!container.alias().isEmpty()) + debug.nospace() << "alias: " << container.alias() << ", "; + + debug.nospace() << "importPaths: " << container.importPaths(); + + return debug.nospace() << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/container/addimportcontainer.h b/share/qtcreator/qml/qmlpuppet/container/addimportcontainer.h index c08d0755f58..33f4db16ea1 100644 --- a/share/qtcreator/qml/qmlpuppet/container/addimportcontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/addimportcontainer.h @@ -61,6 +61,8 @@ private: QDataStream &operator<<(QDataStream &out, const AddImportContainer &command); QDataStream &operator>>(QDataStream &in, AddImportContainer &command); +QDebug operator <<(QDebug debug, const AddImportContainer &container); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::AddImportContainer) diff --git a/share/qtcreator/qml/qmlpuppet/container/idcontainer.cpp b/share/qtcreator/qml/qmlpuppet/container/idcontainer.cpp index 91fab563930..371d70c4cf2 100644 --- a/share/qtcreator/qml/qmlpuppet/container/idcontainer.cpp +++ b/share/qtcreator/qml/qmlpuppet/container/idcontainer.cpp @@ -29,6 +29,8 @@ #include "idcontainer.h" +#include + namespace QmlDesigner { IdContainer::IdContainer() @@ -67,4 +69,12 @@ QDataStream &operator>>(QDataStream &in, IdContainer &container) return in; } + +QDebug operator <<(QDebug debug, const IdContainer &container) +{ + return debug.nospace() << "IdContainer(" + << "instanceId: " << container.instanceId() << ", " + << "id: " << container.id() << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/container/idcontainer.h b/share/qtcreator/qml/qmlpuppet/container/idcontainer.h index 3de3de73223..e23d9bf6fe8 100644 --- a/share/qtcreator/qml/qmlpuppet/container/idcontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/idcontainer.h @@ -56,6 +56,8 @@ private: QDataStream &operator<<(QDataStream &out, const IdContainer &container); QDataStream &operator>>(QDataStream &in, IdContainer &container); +QDebug operator <<(QDebug debug, const IdContainer &container); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::IdContainer) diff --git a/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp b/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp index ea8c5c2099f..6a35403de41 100644 --- a/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp +++ b/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp @@ -31,6 +31,7 @@ #include #include +#include #include @@ -242,4 +243,12 @@ bool operator <(const ImageContainer &first, const ImageContainer &second) return first.m_instanceId < second.m_instanceId; } +QDebug operator <<(QDebug debug, const ImageContainer &container) +{ + return debug.nospace() << "ImageContainer(" + << "instanceId: " << container.instanceId() << ", " + << "size: " << container.image().size() << ")"; +} + + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/container/imagecontainer.h b/share/qtcreator/qml/qmlpuppet/container/imagecontainer.h index 0b9fc32adbd..f372972ecda 100644 --- a/share/qtcreator/qml/qmlpuppet/container/imagecontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/imagecontainer.h @@ -64,6 +64,7 @@ QDataStream &operator>>(QDataStream &in, ImageContainer &container); bool operator ==(const ImageContainer &first, const ImageContainer &second); bool operator <(const ImageContainer &first, const ImageContainer &second); +QDebug operator <<(QDebug debug, const ImageContainer &container); } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/container/informationcontainer.cpp b/share/qtcreator/qml/qmlpuppet/container/informationcontainer.cpp index f0993e89abd..c0b8be04c66 100644 --- a/share/qtcreator/qml/qmlpuppet/container/informationcontainer.cpp +++ b/share/qtcreator/qml/qmlpuppet/container/informationcontainer.cpp @@ -29,6 +29,8 @@ #include "informationcontainer.h" +#include + namespace QmlDesigner { InformationContainer::InformationContainer() @@ -124,4 +126,20 @@ bool operator <(const InformationContainer &first, const InformationContainer &s || (first.m_instanceId == second.m_instanceId && first.m_name == second.m_name && first.m_information < second.m_information); } +QDebug operator <<(QDebug debug, const InformationContainer &container) +{ + debug.nospace() << "InformationContainer(" + << "instanceId: " << container.instanceId() << ", " + << "name: " << container.name() << ", " + << "information: " << container.information(); + + if (container.secondInformation().isValid()) + debug.nospace() << ", " << "secondInformation: " << container.secondInformation(); + + if (container.thirdInformation().isValid()) + debug.nospace() << ", " << "thirdInformation: " << container.thirdInformation(); + + return debug.nospace() << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/container/informationcontainer.h b/share/qtcreator/qml/qmlpuppet/container/informationcontainer.h index 2ffeaf15381..d4111755726 100644 --- a/share/qtcreator/qml/qmlpuppet/container/informationcontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/informationcontainer.h @@ -73,6 +73,7 @@ QDataStream &operator>>(QDataStream &in, InformationContainer &container); bool operator ==(const InformationContainer &first, const InformationContainer &second); bool operator <(const InformationContainer &first, const InformationContainer &second); +QDebug operator <<(QDebug debug, const InformationContainer &container); } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/container/instancecontainer.cpp b/share/qtcreator/qml/qmlpuppet/container/instancecontainer.cpp index 359529fa4c2..10a16616e6f 100644 --- a/share/qtcreator/qml/qmlpuppet/container/instancecontainer.cpp +++ b/share/qtcreator/qml/qmlpuppet/container/instancecontainer.cpp @@ -30,6 +30,7 @@ #include "instancecontainer.h" #include +#include namespace QmlDesigner { @@ -122,4 +123,35 @@ QDataStream &operator>>(QDataStream &in, InstanceContainer &container) return in; } + +QDebug operator <<(QDebug debug, const InstanceContainer &command) +{ + debug.nospace() << "InstanceContainer(" + << "instanceId: " << command.instanceId() << ", " + << "type: " << command.type() << ", " + << "majorNumber: " << command.majorNumber() << ", " + << "minorNumber: " << command.minorNumber() << ", "; + + if (!command.componentPath().isEmpty()) + debug.nospace() << "componentPath: " << command.componentPath() << ", "; + + if (!command.nodeSource().isEmpty()) + debug.nospace() << "nodeSource: " << command.nodeSource() << ", "; + + if (command.nodeSourceType() == InstanceContainer::NoSource) + debug.nospace() << "nodeSourceType: NoSource, "; + else if (command.nodeSourceType() == InstanceContainer::CustomParserSource) + debug.nospace() << "nodeSourceType: CustomParserSource, "; + else + debug.nospace() << "nodeSourceType: ComponentSource, "; + + if (command.metaType() == InstanceContainer::ObjectMetaType) + debug.nospace() << "metatype: ObjectMetaType"; + else + debug.nospace() << "metatype: ItemMetaType"; + + return debug.nospace() << ")"; + +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/container/instancecontainer.h b/share/qtcreator/qml/qmlpuppet/container/instancecontainer.h index 7be7d0983e6..07e5ab05217 100644 --- a/share/qtcreator/qml/qmlpuppet/container/instancecontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/instancecontainer.h @@ -82,6 +82,8 @@ private: qint32 m_metaType; }; +QDebug operator <<(QDebug debug, const InstanceContainer &command); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::InstanceContainer) diff --git a/share/qtcreator/qml/qmlpuppet/container/propertyabstractcontainer.cpp b/share/qtcreator/qml/qmlpuppet/container/propertyabstractcontainer.cpp index 2ba89213eb1..33ffb8b1102 100644 --- a/share/qtcreator/qml/qmlpuppet/container/propertyabstractcontainer.cpp +++ b/share/qtcreator/qml/qmlpuppet/container/propertyabstractcontainer.cpp @@ -29,6 +29,8 @@ #include "propertyabstractcontainer.h" +#include + namespace QmlDesigner { PropertyAbstractContainer::PropertyAbstractContainer() @@ -81,4 +83,19 @@ QDataStream &operator>>(QDataStream &in, PropertyAbstractContainer &container) return in; } +QDebug operator <<(QDebug debug, const PropertyAbstractContainer &container) +{ + debug.nospace() << "PropertyAbstractContainer(" + << "instanceId: " << container.instanceId() << ", " + << "name: " << container.name(); + + if (!container.dynamicTypeName().isEmpty()) + debug.nospace() << ", " << "dynamicTypeName: " << container.dynamicTypeName(); + + debug.nospace() << ")"; + + return debug; +} + + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/container/propertyabstractcontainer.h b/share/qtcreator/qml/qmlpuppet/container/propertyabstractcontainer.h index ba468b4b53b..497af0f2502 100644 --- a/share/qtcreator/qml/qmlpuppet/container/propertyabstractcontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/propertyabstractcontainer.h @@ -48,6 +48,7 @@ class PropertyAbstractContainer friend QDataStream &operator<<(QDataStream &out, const PropertyAbstractContainer &container); friend QDataStream &operator>>(QDataStream &in, PropertyAbstractContainer &container); + friend QDebug operator <<(QDebug debug, const PropertyAbstractContainer &container); public: PropertyAbstractContainer(); PropertyAbstractContainer(qint32 instanceId, const PropertyName &name, const QString &dynamicTypeName); @@ -63,6 +64,7 @@ private: QString m_dynamicTypeName; }; +QDebug operator <<(QDebug debug, const PropertyAbstractContainer &container); } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/container/propertybindingcontainer.cpp b/share/qtcreator/qml/qmlpuppet/container/propertybindingcontainer.cpp index f9602a7eb4d..3064f946e95 100644 --- a/share/qtcreator/qml/qmlpuppet/container/propertybindingcontainer.cpp +++ b/share/qtcreator/qml/qmlpuppet/container/propertybindingcontainer.cpp @@ -29,6 +29,7 @@ #include "propertybindingcontainer.h" +#include namespace QmlDesigner { @@ -90,4 +91,17 @@ QDataStream &operator>>(QDataStream &in, PropertyBindingContainer &container) return in; } +QDebug operator <<(QDebug debug, const PropertyBindingContainer &container) +{ + debug.nospace() << "PropertyBindingContainer(" + << "instanceId: " << container.instanceId() << ", " + << "name: " << container.name() << ", " + << "expression: " << container.expression(); + + if (!container.dynamicTypeName().isEmpty()) + debug.nospace() << ", " << "dynamicTypeName: " << container.dynamicTypeName(); + + return debug.nospace() << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/container/propertybindingcontainer.h b/share/qtcreator/qml/qmlpuppet/container/propertybindingcontainer.h index f285320cab0..1968c3f23cb 100644 --- a/share/qtcreator/qml/qmlpuppet/container/propertybindingcontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/propertybindingcontainer.h @@ -62,6 +62,8 @@ private: QDataStream &operator<<(QDataStream &out, const PropertyBindingContainer &container); QDataStream &operator>>(QDataStream &in, PropertyBindingContainer &container); +QDebug operator <<(QDebug debug, const PropertyBindingContainer &container); + } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::PropertyBindingContainer) diff --git a/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.cpp b/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.cpp index 0508bb41e30..265397ca672 100644 --- a/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.cpp +++ b/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.cpp @@ -105,5 +105,19 @@ bool operator <(const PropertyValueContainer &first, const PropertyValueContaine || (first.m_instanceId == second.m_instanceId && first.m_name < second.m_name); } +QDebug operator <<(QDebug debug, const PropertyValueContainer &container) +{ + debug.nospace() << "PropertyValueContainer(" + << "instanceId: " << container.instanceId() << ", " + << "name: " << container.name() << ", " + << "value: " << container.value(); + + if (!container.dynamicTypeName().isEmpty()) + debug.nospace() << ", " << "dynamicTypeName: " << container.dynamicTypeName(); + + debug.nospace() << ")"; + + return debug; +} } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.h b/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.h index b72374e90cf..d2607594163 100644 --- a/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.h @@ -67,6 +67,7 @@ QDataStream &operator>>(QDataStream &in, PropertyValueContainer &container); bool operator ==(const PropertyValueContainer &first, const PropertyValueContainer &second); bool operator <(const PropertyValueContainer &first, const PropertyValueContainer &second); +QDebug operator <<(QDebug debug, const PropertyValueContainer &container); } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/container/reparentcontainer.cpp b/share/qtcreator/qml/qmlpuppet/container/reparentcontainer.cpp index a313a411b85..6148d98fc5b 100644 --- a/share/qtcreator/qml/qmlpuppet/container/reparentcontainer.cpp +++ b/share/qtcreator/qml/qmlpuppet/container/reparentcontainer.cpp @@ -30,6 +30,7 @@ #include "reparentcontainer.h" #include +#include namespace QmlDesigner { @@ -100,4 +101,24 @@ QDataStream &operator>>(QDataStream &in, ReparentContainer &container) return in; } +QDebug operator <<(QDebug debug, const ReparentContainer &container) +{ + debug.nospace() << "ReparentContainer(" + << "instanceId: " << container.instanceId(); + + if (container.oldParentInstanceId() >= 0) + debug.nospace() << ", " << "oldParentInstanceId: " << container.oldParentInstanceId(); + + if (container.oldParentProperty().isEmpty()) + debug.nospace() << ", " << "oldParentProperty: " << container.oldParentProperty(); + + if (container.newParentInstanceId() >= 0) + debug.nospace() << ", " << "newParentInstanceId: " << container.newParentInstanceId(); + + if (container.newParentProperty().isEmpty()) + debug.nospace() << ", " << "newParentProperty: " << container.newParentProperty(); + + return debug.nospace() << ")"; +} + } // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/container/reparentcontainer.h b/share/qtcreator/qml/qmlpuppet/container/reparentcontainer.h index 94c3b56a227..231d5139662 100644 --- a/share/qtcreator/qml/qmlpuppet/container/reparentcontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/reparentcontainer.h @@ -66,6 +66,8 @@ private: QDataStream &operator<<(QDataStream &out, const ReparentContainer &container); QDataStream &operator>>(QDataStream &in, ReparentContainer &container); +QDebug operator <<(QDebug debug, const ReparentContainer &container); + } // namespace QmlDesigner #endif // REPARENTCONTAINER_H diff --git a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp index 1314bd9ce04..18f9963d995 100644 --- a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp +++ b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp @@ -141,7 +141,7 @@ bool compareCommands(const QVariant &command, const QVariant &controlCommand) return command.value() == controlCommand.value(); else if (command.userType() == valuesChangedCommandType) return command.value() == controlCommand.value(); - else if (command.userType() == pixmapChangedCommandType) + else if (command.userType() == pixmapChangedCommandType) return command.value() == controlCommand.value(); else if (command.userType() == childrenChangedCommandType) return command.value() == controlCommand.value(); @@ -427,9 +427,9 @@ void NodeInstanceClientProxy::dispatchCommand(const QVariant &command) static const int tokenCommandType = QMetaType::type("TokenCommand"); static const int endPuppetCommandType = QMetaType::type("EndPuppetCommand"); - if (command.userType() == createInstancesCommandType) { + if (command.userType() == createInstancesCommandType) createInstances(command.value()); - } else if (command.userType() == changeFileUrlCommandType) + else if (command.userType() == changeFileUrlCommandType) changeFileUrl(command.value()); else if (command.userType() == createSceneCommandType) createScene(command.value()); diff --git a/share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/nodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/nodeinstanceserver.cpp index d51386ec6a2..9cd7aa3e3f2 100644 --- a/share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/nodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/nodeinstanceserver.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include "servernodeinstance.h" #include "objectnodeinstance.h"