diff options
author | Marco Bubke <marco.bubke@digia.com> | 2013-07-16 17:00:07 +0200 |
---|---|---|
committer | Thomas Hartmann <Thomas.Hartmann@digia.com> | 2013-07-16 17:04:31 +0200 |
commit | 0ba2b9b37d745107926e13cf7e241c5351229966 (patch) | |
tree | 892e4e2a740c5f59a1f000f12c3ce58236afa9f7 | |
parent | 8f22b84016021733c0b968d481ff65e21870dea4 (diff) | |
download | qt-creator-0ba2b9b37d745107926e13cf7e241c5351229966.tar.gz |
QmlDesigner: Add qdebugs for commands
Change-Id: I60bdd5b36749be5092d4dabe486b101d62b3df06
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
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 286d520db9..494881f668 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 <QDebug> + 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 4be981f1e9..90a3c3f5b9 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 88a0bb76b7..9192b6cfce 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 <QDebug> + 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 733bc3b3bb..648be83b6b 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 a562ff2cdf..4a1d90b52a 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 <QDataStream> +#include <QDebug> 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 1d96fbfb02..8cb8615351 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 eb55f28eaa..200c57203a 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 <QDebug> + 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 c90311d1d3..287a6860df 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<IdContainer> &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 c106815e26..6b2d9158cd 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 <QDataStream> +#include <QDebug> 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 1ed45cd048..3de4d114cf 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 3ac36fd845..b3418fefc2 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 <QDebug> + 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 5924399a64..24356caf9d 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 5439ff3fe9..d87afcac5b 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 <QDebug> + 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 9d0eb3c63e..f5e56767df 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 3d9f9096f2..3cf00d4993 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 <QDebug> + 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 a4e1804050..7a19ddc73c 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 00ff37b46f..b2e71344aa 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 <QDebug> + 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 69e21de2e1..4251179eb5 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 124ab897fe..b8d5eee112 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 <QDataStream> +#include <QDebug> 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 5824c4c034..ac83fbb643 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 ac54f3b964..7db21440ee 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 <QDataStream> +#include <QDebug> 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 6b65c61c8d..e7e57c07d5 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 f65d2c1b66..497c1140f8 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 <QDataStream> +#include <QDebug> 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 e85c3560cc..a0120bb2d4 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 8f471400e1..87bad4b54c 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 <QDebug> + 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 1244fcfcbe..30e7ecd0ee 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 dcfb7a5344..2d4077744b 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 <QtDebug> + 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 3cd6e006d8..b4862bed89 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 2a910880eb..ada088a1c1 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 <QDebug> + 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 eb0ce6e3f5..761951a065 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 b32afd7b02..420e80e26a 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 <QMetaType> +#include <QtDebug> #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 1a61807b70..933ff2ac57 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/informationchangedcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/informationchangedcommand.h @@ -32,7 +32,6 @@ #include <QMetaType> #include <QVector> -#include <QDebug> #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 6dc0d13391..5105f0a734 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 65eca7665d..3d35e91c99 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 e256d7ae45..619e71845a 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 <QDataStream> +#include <QDebug> 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 1d6ca4d540..561b349475 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 021c0616e7..3a3c73d146 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 <QDebug> + 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 a7410eaeea..667170f9d6 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<PropertyAbstractContainer> &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 da6944d229..51bd363548 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 <QDataStream> +#include <QDebug> 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 75b6efe538..c342ba8df9 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 faac957fec..7713c214d4 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 <QDataStream> +#include <QDebug> 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 68e8d7a672..47cec46d8e 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 4129e2191d..edc0dcfd16 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 <QDebug> + 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 bf31f588d6..2e85ec44b8 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 5307798e14..809537fe84 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 <QDebug> + 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 fd4d9904df..3c4a7716c3 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 91abc7a245..de8ce77e7e 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 <QDataStream> +#include <QDebug> 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 bf42b809ca..e82b805792 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 71e07d55da..a5a9a4db2a 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.cpp +++ b/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.cpp @@ -31,6 +31,7 @@ #include <QSharedMemory> #include <QCache> +#include <QDebug> #include <cstring> @@ -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 9689c7d446..e618a1ef40 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 825387053c..5231395324 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 <QDebug> + 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 c08d0755f5..33f4db16ea 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 91fab56393..371d70c4cf 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 <QDebug> + 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 3de3de7322..e23d9bf6fe 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 ea8c5c2099..6a35403de4 100644 --- a/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp +++ b/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp @@ -31,6 +31,7 @@ #include <QSharedMemory> #include <QCache> +#include <QDebug> #include <cstring> @@ -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 0b9fc32adb..f372972ecd 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 f0993e89ab..c0b8be04c6 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 <QtDebug> + 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 2ffeaf1538..d411175572 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 359529fa4c..10a16616e6 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 <QDataStream> +#include <QDebug> 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 7be7d0983e..07e5ab0521 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 2ba89213eb..33ffb8b110 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 <QDebug> + 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 ba468b4b53..497af0f250 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 f9602a7eb4..3064f946e9 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 <QDebug> 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 f285320cab..1968c3f23c 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 0508bb41e3..265397ca67 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 b72374e90c..d260759416 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 a313a411b8..6148d98fc5 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 <QDataStream> +#include <QDebug> 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 94c3b56a22..231d513966 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 1314bd9ce0..18f9963d99 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<InformationChangedCommand>() == controlCommand.value<InformationChangedCommand>(); else if (command.userType() == valuesChangedCommandType) return command.value<ValuesChangedCommand>() == controlCommand.value<ValuesChangedCommand>(); - else if (command.userType() == pixmapChangedCommandType) + else if (command.userType() == pixmapChangedCommandType) return command.value<PixmapChangedCommand>() == controlCommand.value<PixmapChangedCommand>(); else if (command.userType() == childrenChangedCommandType) return command.value<ChildrenChangedCommand>() == controlCommand.value<ChildrenChangedCommand>(); @@ -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<CreateInstancesCommand>()); - } else if (command.userType() == changeFileUrlCommandType) + else if (command.userType() == changeFileUrlCommandType) changeFileUrl(command.value<ChangeFileUrlCommand>()); else if (command.userType() == createSceneCommandType) createScene(command.value<CreateSceneCommand>()); diff --git a/share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/nodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/nodeinstanceserver.cpp index d51386ec6a..9cd7aa3e3f 100644 --- a/share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/nodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/nodeinstanceserver.cpp @@ -42,6 +42,7 @@ #include <QAbstractAnimation> #include <private/qabstractanimation_p.h> #include <QMutableVectorIterator> +#include <QtDebug> #include "servernodeinstance.h" #include "objectnodeinstance.h" |