summaryrefslogtreecommitdiffstats
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>2010-10-05 10:15:20 -0300
commit6c7e12d9651c1017d64a104b97a7a49631fc0a82 (patch)
treebeca9dce1e4f6da3b8820eb06525f77f8b132982
parentb5ce4ccf7c96926ed2eb5e0818ccd6b60e3bb907 (diff)
downloadshiboken-6c7e12d9651c1017d64a104b97a7a49631fc0a82.tar.gz
shiboken-6c7e12d9651c1017d64a104b97a7a49631fc0a82.tar.xz
shiboken-6c7e12d9651c1017d64a104b97a7a49631fc0a82.zip
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>
-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);
}