diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-03-19 02:20:44 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-03-19 02:20:44 (GMT) |
commit | d05ecf5998d8ef2b344f3763fbf97f7426336728 (patch) | |
tree | a4c8ec6b1fc27b163487de2c35c27955ed7c37d3 /src/corelib | |
parent | cd47b6aad611dae7d143233013c48d48a5c0c192 (diff) | |
parent | de300d7a41b0e428ba11e6061c39580c54012dc9 (diff) | |
download | Qt-d05ecf5998d8ef2b344f3763fbf97f7426336728.zip Qt-d05ecf5998d8ef2b344f3763fbf97f7426336728.tar.gz Qt-d05ecf5998d8ef2b344f3763fbf97f7426336728.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7
Conflicts:
tests/auto/declarative/qdeclarativeecmascript/testtypes.h
Diffstat (limited to 'src/corelib')
-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; } |