diff options
Diffstat (limited to 'src/qml/jsruntime/qv4function.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4function.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp index a853eac41d..ca6574d32b 100644 --- a/src/qml/jsruntime/qv4function.cpp +++ b/src/qml/jsruntime/qv4function.cpp @@ -158,16 +158,13 @@ Function::Function(ExecutionEngine *engine, ExecutableCompilationUnit *unit, return qmltype; if (qmltype.isInlineComponentType()) { - if (qmltype.typeId().isValid()) { - // If it seems to be an IC type, make sure there is an actual - // compilation unit for it. We create inline component types speculatively. - return QQmlMetaType::obtainCompilationUnit(qmltype.typeId()) - ? qmltype - : QQmlType(); - } else { - // TODO: Can this actually happen? - return base->qmlTypeForComponent(qmltype.elementName()); - } + Q_ASSERT(qmltype.typeId().isValid()); + + // If it seems to be an IC type, make sure there is an actual + // compilation unit for it. We create inline component types speculatively. + return QQmlMetaType::obtainCompilationUnit(qmltype.typeId()) + ? qmltype + : QQmlType(); } return qmltype.typeId().isValid() ? qmltype : QQmlType(); |
