diff options
| author | Vladimir Belyavsky <belyavskyv@gmail.com> | 2023-12-04 20:40:49 +0300 |
|---|---|---|
| committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-01-11 18:44:05 +0000 |
| commit | 37533c8b7aa75aa88d2b11a6dd82fcf570ffafc8 (patch) | |
| tree | fc8f3b746d3ebc39ef61a0f14bf472209fa69171 | |
| parent | b6e483af9d0c55214cd8e6658868f6baa89e641e (diff) | |
tst_textarea: fix warnings
Fix all warnings encountered in test run:
- in test_alignment()
QWARN Could not set initial property horizontalAlignment
- in test_flickable():
QWARN Setting initial properties failed: QQuickFlickable does not have a
property called selectByMouse
QWARN Setting initial properties failed: QQuickFlickable does not have a
property called text
- in test_font_explicit_attributes(family)
QWARN qt.qpa.fonts: Populating font family aliases took 130 ms. Replace
uses of missing font family "Courier" with one that exists to avoid this
cost.
Fixes: QTBUG-119645
Task-number: QTBUG-99231
Pick-to: 6.5
Change-Id: I9939286c46eebc188610ee0b09350be8dda833b3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit ea3d7ec08b99914ccd961ca7a46ea8abdbc3f54d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 476adce4a7cfc2df83f60da17dc14b821f35be13)
| -rw-r--r-- | tests/auto/quickcontrols/controls/data/tst_textarea.qml | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/quickcontrols/controls/data/tst_textarea.qml b/tests/auto/quickcontrols/controls/data/tst_textarea.qml index 1e03947e05..1831700345 100644 --- a/tests/auto/quickcontrols/controls/data/tst_textarea.qml +++ b/tests/auto/quickcontrols/controls/data/tst_textarea.qml @@ -207,10 +207,12 @@ TestCase { } function test_alignment(data) { - var control = createTemporaryObject(textArea, testCase, {text: data.text, placeholderText: data.placeholderText, horizontalAlignment: data.textAlignment}) + var control = createTemporaryObject(textArea, testCase, {text: data.text, placeholderText: data.placeholderText}) - if (data.textAlignment !== undefined) + if (data.textAlignment !== undefined) { + control.horizontalAlignment = data.textAlignment compare(control.horizontalAlignment, data.textAlignment) + } // The placeholder text of the Material style doesn't currently respect the alignment of the control. if (StyleInfo.styleName !== "Material") { @@ -234,7 +236,7 @@ TestCase { return [ {tag: "bold", value: true}, {tag: "capitalization", value: Font.Capitalize}, - {tag: "family", value: "Courier"}, + {tag: "family", value: "Tahoma"}, {tag: "italic", value: true}, {tag: "strikeout", value: true}, {tag: "underline", value: true}, @@ -272,7 +274,7 @@ TestCase { } function test_flickable() { - var control = createTemporaryObject(flickable, testCase, {text:"line0", selectByMouse: true}) + var control = createTemporaryObject(flickable, testCase) verify(control) var textArea = control.TextArea.flickable |
