diff options
author | Sami Shalayel <sami.shalayel@qt.io> | 2023-12-15 11:48:13 +0100 |
---|---|---|
committer | Sami Shalayel <sami.shalayel@qt.io> | 2023-12-29 09:48:18 +0100 |
commit | 2b008f242150017415bc427d87e84ac81b95e877 (patch) | |
tree | 01629d633db786027d77af779174e121fcf83900 /tests/auto/quick | |
parent | ff4c2c311f1957ebacb66f0d35406a51da2a544e (diff) |
qmlls: adapt parser for attached/grouped properties completion
Add a recovery mode to the parser to accept bindings that are not
completely written out, and create an empty statement for that. This
mode is called enableIncompleteBindings and is only enabled for qmlls.
Also adapt qqmldomastcreator to those empty statements, and qmllsutils.
Pick-to: 6.7
Fixes: QTBUG-120169
Task-number: QTBUG-92876
Change-Id: Ic24cbb61e3be08368027371e377bf75ce87fafb1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/quick')
-rw-r--r-- | tests/auto/quick/qquickloader/tst_qquickloader.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/auto/quick/qquickloader/tst_qquickloader.cpp b/tests/auto/quick/qquickloader/tst_qquickloader.cpp index 709deddc91..d1093a10e4 100644 --- a/tests/auto/quick/qquickloader/tst_qquickloader.cpp +++ b/tests/auto/quick/qquickloader/tst_qquickloader.cpp @@ -752,8 +752,10 @@ void tst_QQuickLoader::initialPropertyValuesError_data() QTest::newRow("nonexistent source url") << testFileUrl("initialPropertyValues.error.2.qml") << (QStringList() << QString(testFileUrl("NonexistentSourceComponent.qml").toString() + ": No such file or directory")); - QTest::newRow("invalid source url") << testFileUrl("initialPropertyValues.error.3.qml") - << (QStringList() << QString(testFileUrl("InvalidSourceComponent.qml").toString() + ":5:1: Expected token `:'")); + QTest::newRow("invalid source url") + << testFileUrl("initialPropertyValues.error.3.qml") + << (QStringList() << QString(testFileUrl("InvalidSourceComponent.qml").toString() + + ":4:5: Incomplete binding, expected token `:` or `{`")); QTest::newRow("invalid initial property values object with invalid property access") << testFileUrl("initialPropertyValues.error.4.qml") << (QStringList() << QString(testFileUrl("initialPropertyValues.error.4.qml").toString() + ":7:5: QML Loader: setSource: value is not an object") @@ -898,8 +900,10 @@ void tst_QQuickLoader::asynchronous_data() QTest::newRow("Non-existent component") << testFileUrl("IDoNotExist.qml") << (QStringList() << QString(testFileUrl("IDoNotExist.qml").toString() + ": No such file or directory")); - QTest::newRow("Invalid component") << testFileUrl("InvalidSourceComponent.qml") - << (QStringList() << QString(testFileUrl("InvalidSourceComponent.qml").toString() + ":5:1: Expected token `:'")); + QTest::newRow("Invalid component") + << testFileUrl("InvalidSourceComponent.qml") + << (QStringList() << QString(testFileUrl("InvalidSourceComponent.qml").toString() + + ":4:5: Incomplete binding, expected token `:` or `{`")); } void tst_QQuickLoader::asynchronous() |