diff options
author | Edward Welbourne <[email protected]> | 2023-06-05 12:53:10 +0200 |
---|---|---|
committer | Edward Welbourne <[email protected]> | 2023-09-10 14:21:08 +0200 |
commit | da64491967a1958d0c3ec3653480f24e52226910 (patch) | |
tree | aeb548a3201992f30066c0ff7beabc39acff47f9 /tests/auto/quick/qquicktext/tst_qquicktext.cpp | |
parent | 68797cb017ca5f0218bdec5cf9186da5e1438fe1 (diff) |
Prevent, ignore or correct warning and info messages in tst_qquicktext
In embeddedImages(), some ignored messages came out wrong due to
dangling after-effects of clipRectOutsideViewportDynamicallyChanged().
Since qmlClearTypeRegistrations(); at the end of the latter throws
baseUrl() off, do it at the start of embeddedImages_data().
Fix a duplicate data-row name, to avoid the new warning against those.
Add missing (line) => parameter list to various onLineLaidOut() callbacks.
Change-Id: Ic6ded0f29050e8cb41795bf74c505f08921523e6
Reviewed-by: Ulf Hermann <[email protected]>
Diffstat (limited to 'tests/auto/quick/qquicktext/tst_qquicktext.cpp')
-rw-r--r-- | tests/auto/quick/qquicktext/tst_qquicktext.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp index e0e46e2ae7..385064fc31 100644 --- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp +++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp @@ -2204,12 +2204,15 @@ void tst_qquicktext::baseUrl() void tst_qquicktext::embeddedImages_data() { + // Cancel some mess left by clipRectOutsideViewportDynamicallyChanged(): + qmlClearTypeRegistrations(); + QTest::addColumn<QUrl>("qmlfile"); QTest::addColumn<QString>("error"); QTest::newRow("local") << testFileUrl("embeddedImagesLocal.qml") << ""; QTest::newRow("local-error") << testFileUrl("embeddedImagesLocalError.qml") << testFileUrl("embeddedImagesLocalError.qml").toString()+":3:1: QML Text: Cannot open: " + testFileUrl("http/notexists.png").toString(); - QTest::newRow("local") << testFileUrl("embeddedImagesLocalRelative.qml") << ""; + QTest::newRow("local-relative") << testFileUrl("embeddedImagesLocalRelative.qml") << ""; QTest::newRow("remote") << testFileUrl("embeddedImagesRemote.qml") << ""; QTest::newRow("remote-error") << testFileUrl("embeddedImagesRemoteError.qml") << testFileUrl("embeddedImagesRemoteError.qml").toString()+":3:1: QML Text: Error transferring {{ServerBaseUrl}}/notexists.png - server replied: Not found"; @@ -4274,7 +4277,7 @@ void tst_qquicktext::baselineOffset_data() QTest::newRow("customLine") << "hello world" << "hello\nworld" - << QByteArray("height: 200; onLineLaidOut: line.y += 16") + << QByteArray("height: 200; onLineLaidOut: (line) => { line.y += 16; }") << &expectedBaselineCustom << &expectedBaselineCustom; @@ -4370,7 +4373,8 @@ void tst_qquicktext::baselineOffset_data() QTest::newRow("customLine with padding") << "hello world" << "hello\nworld" - << QByteArray("height: 200; topPadding: 10; bottomPadding: 20; onLineLaidOut: line.y += 16") + << QByteArray("height: 200; topPadding: 10; bottomPadding: 20; " + "onLineLaidOut: (line) => { line.y += 16; }") << &expectedBaselineCustom << &expectedBaselineCustom; |