diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-02-17 17:46:33 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-02-21 12:53:34 +0100 |
commit | 345cb3b6f38bead32cff74dfbe68fa4bfe13b631 (patch) | |
tree | 6a906cb4681c49d826511bdb9b8d5098e016e8d0 /src/qmlcompiler | |
parent | 0adc4b6988e51f4700a62d611c61308ada86a422 (diff) |
QmlCompiler: Do not crash on attempts to lookup a function in the scope
Rather, reject the code and let the engine handle it.
Fixes: QTBUG-100980
Change-Id: Ibcd1249ba3550b40121622752b4ca22d1df3ed2a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
(cherry picked from commit 69fefd94e8b0ec2aa379d0b75ccaa2c58e3f0933)
Diffstat (limited to 'src/qmlcompiler')
-rw-r--r-- | src/qmlcompiler/qqmljscodegenerator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qmlcompiler/qqmljscodegenerator.cpp b/src/qmlcompiler/qqmljscodegenerator.cpp index c879260755..9152479d29 100644 --- a/src/qmlcompiler/qqmljscodegenerator.cpp +++ b/src/qmlcompiler/qqmljscodegenerator.cpp @@ -722,7 +722,7 @@ void QQmlJSCodeGenerator::generate_LoadQmlContextPropertyLookup(int index) } else if (m_state.accumulatorOut.isType() || m_state.accumulatorOut.isImportNamespace()) { generateTypeLookup(index); } else { - Q_UNREACHABLE(); + reject(u"lookup of %1"_qs.arg(m_state.accumulatorOut.descriptiveName())); } } |