summaryrefslogtreecommitdiffstats
path: root/generator/cppgenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'generator/cppgenerator.cpp')
-rw-r--r--generator/cppgenerator.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index 7db34192..3e4f8565 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -2410,6 +2410,7 @@ void CppGenerator::writeClassDefinition(QTextStream& s, const AbstractMetaClass*
m_tpFuncs[func->name()] = cpythonFunctionName(func);
}
if (m_tpFuncs["__repr__"] == "0"
+ && !metaClass->isQObject()
&& metaClass->hasToStringCapability()) {
m_tpFuncs["__repr__"] = writeReprFunction(s, metaClass);
}