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.6 6.5
Change-Id: I9939286c46eebc188610ee0b09350be8dda833b3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit ea3d7ec08b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Vladimir Belyavsky 2023-12-04 20:40:49 +03:00 committed by Qt Cherry-pick Bot
parent 722763e9d6
commit 476adce4a7
1 changed files with 6 additions and 4 deletions

View File

@ -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