diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2024-02-05 15:27:13 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-02-08 00:18:17 +0100 |
commit | 7a3dfcff281f91fe11eac1bc09e0049a5a72d334 (patch) | |
tree | 7858fac3cd423f85699cb87d9764c32254a47e77 /src/qml/jsruntime/qv4function.cpp | |
parent | e516ef519b116f27d7ed5387275be27a4215a792 (diff) |
QtQml: Drop some dead code
The meta types of inline components are always valid these days.
Change-Id: I2e45b29b816ad4798876185e773e9f7be98557e8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
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(); |