aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlformat
diff options
context:
space:
mode:
authorSemih Yavuz <semih.yavuz@qt.io>2023-05-23 15:02:50 +0200
committerSemih Yavuz <semih.yavuz@qt.io>2023-05-31 09:22:46 +0200
commit7a4175ff605d69dcafa4eb6aaf7aee3cf2620035 (patch)
tree8a7f7e7635e7af96eaf92885c54376930ec50eb2 /tests/auto/qml/qmlformat
parentdc30e3859f4df146a675c367162720eae8d91982 (diff)
qmlls: Fix TextSynchronization
The offset from a given range was incorrectly calculated in findBlockByNumber because textblocks that are used to obtain that position were mistakenly ignoring the newline character. This were leading us to setting a different text than what we actually typed. Add an extra text block if the text ends with \n. Add a manual test but exclude it from tst_qmlformat as it is not a valid qml document. Fixes: QTBUG-113725 Change-Id: Ifb1b4121fd8af46df7627d986303ae67e170e50c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlformat')
-rw-r--r--tests/auto/qml/qmlformat/tst_qmlformat.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlformat/tst_qmlformat.cpp b/tests/auto/qml/qmlformat/tst_qmlformat.cpp
index cb3206069c..48efab4b3a 100644
--- a/tests/auto/qml/qmlformat/tst_qmlformat.cpp
+++ b/tests/auto/qml/qmlformat/tst_qmlformat.cpp
@@ -87,6 +87,7 @@ void TestQmlformat::initTestCase()
m_excludedDirs << "doc/src/snippets/qtquick1/qtbinding";
m_excludedDirs << "doc/src/snippets/qtquick1/imports";
m_excludedDirs << "tests/manual/v4";
+ m_excludedDirs << "tests/manual/qmllsformatter";
m_excludedDirs << "tests/auto/qml/ecmascripttests";
m_excludedDirs << "tests/auto/qml/qmllint";