aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/pysidetest/testobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2/tests/pysidetest/testobject.cpp')
-rw-r--r--sources/pyside2/tests/pysidetest/testobject.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/sources/pyside2/tests/pysidetest/testobject.cpp b/sources/pyside2/tests/pysidetest/testobject.cpp
index 03a7a965c..441ae872f 100644
--- a/sources/pyside2/tests/pysidetest/testobject.cpp
+++ b/sources/pyside2/tests/pysidetest/testobject.cpp
@@ -52,3 +52,25 @@ void TestObject::emitSignalWithTypedefValue(int value)
{
emit signalWithTypedefValue(TypedefValue(value));
}
+
+QDebug operator<<(QDebug dbg, TestObject& testObject)
+{
+ QDebugStateSaver saver(dbg);
+ dbg.nospace() << "TestObject(id=" << testObject.idValue() << ") ";
+ return dbg;
+}
+
+namespace PySideCPP {
+ QDebug operator<<(QDebug dbg, TestObjectWithNamespace& testObject)
+ {
+ QDebugStateSaver saver(dbg);
+ dbg.nospace() << "TestObjectWithNamespace(" << testObject.name() << ") ";
+ return dbg;
+ }
+ QDebug operator<<(QDebug dbg, TestObject2WithNamespace& testObject)
+ {
+ QDebugStateSaver saver(dbg);
+ dbg.nospace() << "TestObject2WithNamespace(" << testObject.name() << ") ";
+ return dbg;
+ }
+}