diff options
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet/container')
18 files changed, 179 insertions, 0 deletions
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 |