diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-09-07 12:51:45 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:51 -0300 |
commit | a92a006fd9d6c3256071e75c3bc13ec3a7a83586 (patch) | |
tree | 2b7764fd9507da6c3d7ce7c1a6f3f48c5e774dc5 /libpyside | |
parent | f16a241b13fa09e5243c6fd88b02fc76d3f39e48 (diff) |
Avoid register property twice during the object instaciation.
Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
Lauro Neto <lauro.neto@openbossa.org>
Diffstat (limited to 'libpyside')
-rw-r--r-- | libpyside/dynamicqmetaobject.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libpyside/dynamicqmetaobject.cpp b/libpyside/dynamicqmetaobject.cpp index 8b8998b0c..ec9b8bd34 100644 --- a/libpyside/dynamicqmetaobject.cpp +++ b/libpyside/dynamicqmetaobject.cpp @@ -481,7 +481,9 @@ void DynamicQMetaObject::parsePythonType(PyTypeObject* type) while (PyDict_Next(attrs, &pos, &key, &value)) { if (Property::checkType(value)) { // Leave the properties to be register after signals because they may depend on notify signals - properties << PropPair(PyString_AS_STRING(key), value); + int index = d.superdata->indexOfProperty(PyString_AS_STRING(key)); + if (index == -1) + properties << PropPair(PyString_AS_STRING(key), value); } else if (Signal::checkType(value)) { // Register signals PySideSignal* data = reinterpret_cast<PySideSignal*>(value); const char* signalName = PyString_AS_STRING(key); |