diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-18 23:07:53 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-18 23:07:53 (GMT) |
commit | de300d7a41b0e428ba11e6061c39580c54012dc9 (patch) | |
tree | 1c03abb47596da09841087e3b3cf7408b65bfb50 /src/corelib/kernel | |
parent | abf09f87af8f57f670904ff25a626d19ec11120b (diff) | |
parent | e884829f23fad15086f07aa92e1d92bcb71d53ba (diff) | |
download | Qt-de300d7a41b0e428ba11e6061c39580c54012dc9.zip Qt-de300d7a41b0e428ba11e6061c39580c54012dc9.tar.gz Qt-de300d7a41b0e428ba11e6061c39580c54012dc9.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Fix bug when resetting QSortFilterProxyModel
Fix the QSplitter not showing correctly in QGraphicsView
Remove ; after Q_PROPERTY declaration
Fix compilation issues of autotest on solaris
fix a crash when registering 2 metatype name for the same actual type
Fixed problem in painting of QTreeView
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qmetatype.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 30af6fa..ce9ed58 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -518,19 +518,15 @@ int QMetaType::registerTypedef(const char* typeName, int aliasId) idx = qMetaTypeCustomType_unlocked(normalizedTypeName.constData(), normalizedTypeName.size()); - if (idx) { - Q_ASSERT(idx == aliasId); + if (idx) return idx; - } - if (!idx) { - QCustomTypeInfo inf; - inf.typeName = normalizedTypeName; - inf.alias = aliasId; - inf.constr = 0; - inf.destr = 0; - ct->append(inf); - } + QCustomTypeInfo inf; + inf.typeName = normalizedTypeName; + inf.alias = aliasId; + inf.constr = 0; + inf.destr = 0; + ct->append(inf); return aliasId; } |