diff options
Diffstat (limited to 'tests')
4 files changed, 12 insertions, 10 deletions
diff --git a/tests/auto/quick/qquicktext/data/fontSizeMode.qml b/tests/auto/quick/qquicktext/data/fontSizeMode.qml index 84f7ce8d50..48e7c7b6d0 100644 --- a/tests/auto/quick/qquicktext/data/fontSizeMode.qml +++ b/tests/auto/quick/qquicktext/data/fontSizeMode.qml @@ -13,10 +13,10 @@ Item { id: myText objectName: "myText" width: 250 - height: 41 + height: 35 minimumPointSize: 8 minimumPixelSize: 8 - font.pixelSize: 30 + font.pixelSize: 25 font.family: "Helvetica" } } diff --git a/tests/auto/quick/qquicktext/data/hAlignImplicitWidth.qml b/tests/auto/quick/qquicktext/data/hAlignImplicitWidth.qml index 9c9318d3cc..45255691fb 100644 --- a/tests/auto/quick/qquicktext/data/hAlignImplicitWidth.qml +++ b/tests/auto/quick/qquicktext/data/hAlignImplicitWidth.qml @@ -1,7 +1,7 @@ import QtQuick 2.0 Rectangle { - width: 200 + width: 220 height: 100 Text { diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp index c1f10f9788..6042c08891 100644 --- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp +++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp @@ -913,7 +913,7 @@ void tst_qquicktext::hAlignImplicitWidth() // Try to check whether alignment works by checking the number of black // pixels in the thirds of the grabbed image. - const int windowWidth = 200; + const int windowWidth = 220; const int textWidth = qCeil(text->implicitWidth()); QVERIFY2(textWidth < windowWidth, "System font too large."); const int sectionWidth = textWidth / 3; @@ -3756,8 +3756,8 @@ void tst_qquicktext::baselineOffset_data() << "<b>hello world</b>" << "<b>hello<br/>world</b>" << QByteArray("height: 200") - << &expectedBaselineTop - << &expectedBaselineBold; + << &expectedBaselineBold + << &expectedBaselineTop; QTest::newRow("richText") << "<b>hello world</b>" @@ -3852,8 +3852,8 @@ void tst_qquicktext::baselineOffset_data() << "<b>hello world</b>" << "<b>hello<br/>world</b>" << QByteArray("height: 200; topPadding: 10; bottomPadding: 20") - << &expectedBaselineTop - << &expectedBaselineBold; + << &expectedBaselineBold + << &expectedBaselineTop; QTest::newRow("richText with padding") << "<b>hello world</b>" diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp index 079f73ae34..85123c6f92 100644 --- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp +++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp @@ -3092,14 +3092,16 @@ void tst_qquicktextinput::cursorRectangle() } else { QCOMPARE(r.left(), input.width()); } - QVERIFY(r.top() >= line.height() - 1); + // we can't be exact here, as the space character can have a different ascent/descent from the arabic chars + // this then leads to different line heights between the wrapped and non wrapped texts + QVERIFY(r.top() >= line.height() - 5); COMPARE_INPUT_METHOD_QUERY(QRectF, (&input), Qt::ImCursorRectangle, toRectF, r); QCOMPARE(input.positionToRectangle(11), r); for (int i = wrapPosition + 1; i < text.length(); ++i) { input.setCursorPosition(i); r = input.cursorRectangle(); - QVERIFY(r.top() >= line.height() - 1); + QVERIFY(r.top() >= line.height() - 5); COMPARE_INPUT_METHOD_QUERY(QRectF, (&input), Qt::ImCursorRectangle, toRectF, r); QCOMPARE(input.positionToRectangle(i), r); } |