summaryrefslogtreecommitdiff
path: root/share/qtcreator/qml/qmlpuppet/container/instancecontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet/container/instancecontainer.cpp')
-rw-r--r--share/qtcreator/qml/qmlpuppet/container/instancecontainer.cpp32
1 files changed, 32 insertions, 0 deletions
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