aboutsummaryrefslogtreecommitdiffstats
path: root/PySide
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-11-01 17:29:01 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:56:16 -0300
commitdde75099f284a1c44773501fde77dc17d445028d (patch)
tree781fb8969f7d4412448d7ac6cb72d9e7616f892e /PySide
parent64ffc4f61b874e461c559495ece6f963ce5153ee (diff)
Fix bug 1029 - "qmlRegisterType Fails to Increase the Ref Count"
Diffstat (limited to 'PySide')
-rw-r--r--PySide/QtDeclarative/pysideqmlregistertype.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/PySide/QtDeclarative/pysideqmlregistertype.cpp b/PySide/QtDeclarative/pysideqmlregistertype.cpp
index 1fc802012..7dfd7a622 100644
--- a/PySide/QtDeclarative/pysideqmlregistertype.cpp
+++ b/PySide/QtDeclarative/pysideqmlregistertype.cpp
@@ -113,6 +113,9 @@ int PySide::qmlRegisterType(PyObject* pyObj, const char* uri, int versionMajor,
QMetaObject* metaObject = reinterpret_cast<QMetaObject*>(ObjectType::getTypeUserData(reinterpret_cast<SbkObjectType*>(pyObj)));
Q_ASSERT(metaObject);
+ // Inc ref the type object, don't worry about dec ref them because there's no way to unregister a QML type
+ Py_INCREF(pyObj);
+
// All ready... now the ugly code begins... :-)
pyTypes[nextType] = pyObj;