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.7 6.6 6.5 Change-Id: I34edb8a8c85ad134f3a8844463722f71bd30bc1b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This commit is contained in:
parent
ea3d7ec08b
commit
26effad71e
|
@ -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},
|
||||
|
|
Loading…
Reference in New Issue