aboutsummaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-10-04 19:11:27 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:07:20 -0300
commita09cc0c3c0360ba5eb32079e95e6c00970a0ea34 (patch)
tree84425751d49cc6b555a585a2c8f87a0d8341254e /generator
parent14d0445164c48d25923da38973dddf290fe16178 (diff)
Disable generation of __repr__ function for QObjects.
The Qt implamentation is not usefull to Python developers. Reviewer: Renato Araújo <renato.filho@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'generator')
-rw-r--r--generator/cppgenerator.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index 7db34192e..3e4f85658 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);
}