summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/corelib/kernel/qmetatype.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index 30af6fadb5..ce9ed58e29 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;
}