aboutsummaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-09-08 15:03:55 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:17:13 -0300
commit987010cb2c5740bf1cb7af54b2c6dc3142c44805 (patch)
tree47b99fb505663b9f2235c57162caf63050f7160a /generator
parent9040f2afccd26647071a8f1753370f6935408231 (diff)
Use internal dynamic metaobject insted of created by pyside.
Reviewer: Hugo Parente <hugo.lima@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'generator')
-rw-r--r--generator/cppgenerator.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index 124e861a6..b75a653bf 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -886,6 +886,9 @@ void CppGenerator::writeMetaObjectMethod(QTextStream& s, const AbstractMetaClass
QString wrapperClassName = wrapperName(metaClass);
s << "const QMetaObject* " << wrapperClassName << "::metaObject() const" << endl;
s << '{' << endl;
+ s << INDENT << "#if QT_VERSION >= 0x040700" << endl;
+ s << INDENT << "if (QObject::d_ptr->metaObject) return QObject::d_ptr->metaObject;" << endl;
+ s << INDENT << "#endif" << endl;
s << INDENT << "SbkObject* pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this);" << endl;
s << INDENT << "return PySide::SignalManager::retriveMetaObject(reinterpret_cast<PyObject*>(pySelf));" << endl;
s << '}' << endl << endl;