aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Belyavsky <belyavskyv@gmail.com>2023-12-04 20:52:40 +0300
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-01-11 18:44:05 +0000
commitb6e483af9d0c55214cd8e6658868f6baa89e641e (patch)
treea8fc06cbe83630acb806825ad3196b5290f4e231
parent8903bb3d64f6c47cd7e616fcba0a8e972c68b387 (diff)
tst_textfield: fix warnings
Fix all warnings encountered in test run: - in test_alignment() QWARN Could not set initial property horizontalAlignment - 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-119646 Pick-to: 6.5 Change-Id: I34edb8a8c85ad134f3a8844463722f71bd30bc1b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 26effad71e174d2b6df297ef3e43b3dcf2e021c9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 722763e9d69e5a17ab70848051ed86e58ab94cb7)
-rw-r--r--tests/auto/quickcontrols/controls/data/tst_textfield.qml8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/quickcontrols/controls/data/tst_textfield.qml b/tests/auto/quickcontrols/controls/data/tst_textfield.qml
index 66dcdc397a..795e6a79b2 100644
--- a/tests/auto/quickcontrols/controls/data/tst_textfield.qml
+++ b/tests/auto/quickcontrols/controls/data/tst_textfield.qml
@@ -154,10 +154,12 @@ TestCase {
}
function test_alignment(data) {
- var control = createTemporaryObject(textField, testCase, {text: data.text, placeholderText: data.placeholderText, horizontalAlignment: data.textAlignment})
+ var control = createTemporaryObject(textField, 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") {
for (var i = 0; i < control.children.length; ++i) {
@@ -180,7 +182,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},