diff options
author | Andy Shaw <andy.shaw@qt.io> | 2020-11-25 14:00:11 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2020-11-30 07:36:07 +0100 |
commit | e32947d25245bdf5ca9b969e82c4e66de48957bb (patch) | |
tree | 4eaef81431c370d1c39d340a6a79144f82155315 /tests/auto | |
parent | 198db199e5e9f7f6bf8c2a8fdd870d46c5615256 (diff) |
Make adjustments for using QFont::setFamilies()
Since we only depend on using setFamilies() now instead of setFamily()
then we can rely on the fact that it will be resolved correctly, so we
can remove the code that was ensuring that family() would take
precedence if families() was empty.
Change-Id: Iea1464ec840dc76c04a4acae445cab367e03d3ca
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/font/tst_font.cpp | 6 | ||||
-rw-r--r-- | tests/auto/qquickmaterialstyleconf/tst_qquickmaterialstyleconf.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qquickuniversalstyleconf/tst_qquickuniversalstyleconf.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/font/tst_font.cpp b/tests/auto/font/tst_font.cpp index aeaa49f8..976658b5 100644 --- a/tests/auto/font/tst_font.cpp +++ b/tests/auto/font/tst_font.cpp @@ -124,7 +124,7 @@ void tst_font::font_data() QFont customFont; customFont.setCapitalization(QFont::AllUppercase); - customFont.setFamily("Courier"); + customFont.setFamilies(QStringList{QLatin1String("Courier")}); customFont.setItalic(true); customFont.setPixelSize(60); customFont.setStrikeOut(true); @@ -198,7 +198,7 @@ void tst_font::inheritance() QCOMPARE(grandChild->property("font").value<QFont>(), QFont()); QFont childFont; - childFont.setFamily("Arial"); + childFont.setFamilies(QStringList{QLatin1String("Arial")}); childFont.setPixelSize(80); childFont.setItalic(true); child->setProperty("font", childFont); @@ -206,7 +206,7 @@ void tst_font::inheritance() QCOMPARE(grandChild->property("font").value<QFont>(), childFont); QFont grandChildFont(childFont); - grandChildFont.setFamily("Times New Roman"); + grandChildFont.setFamilies(QStringList{QLatin1String("Times New Roman")}); grandChildFont.setUnderline(true); grandChild->setProperty("font", grandChildFont); QCOMPARE(child->property("font").value<QFont>(), childFont); diff --git a/tests/auto/qquickmaterialstyleconf/tst_qquickmaterialstyleconf.cpp b/tests/auto/qquickmaterialstyleconf/tst_qquickmaterialstyleconf.cpp index 7612b99b..e0fd8fef 100644 --- a/tests/auto/qquickmaterialstyleconf/tst_qquickmaterialstyleconf.cpp +++ b/tests/auto/qquickmaterialstyleconf/tst_qquickmaterialstyleconf.cpp @@ -60,7 +60,7 @@ void tst_qquickmaterialstyleconf::conf() QVERIFY2(helper.ready, helper.failureMessage()); QFont customFont; - customFont.setFamily("Courier"); + customFont.setFamilies(QStringList{QLatin1String("Courier")}); customFont.setPixelSize(22); QQuickApplicationWindow *window = helper.appWindow; diff --git a/tests/auto/qquickuniversalstyleconf/tst_qquickuniversalstyleconf.cpp b/tests/auto/qquickuniversalstyleconf/tst_qquickuniversalstyleconf.cpp index 08eae67c..bef3b1cd 100644 --- a/tests/auto/qquickuniversalstyleconf/tst_qquickuniversalstyleconf.cpp +++ b/tests/auto/qquickuniversalstyleconf/tst_qquickuniversalstyleconf.cpp @@ -57,7 +57,7 @@ void tst_qquickuniversalstyleconf::conf() QVERIFY2(helper.ready, helper.failureMessage()); QFont customFont; - customFont.setFamily("Courier"); + customFont.setFamilies(QStringList{QLatin1String("Courier")}); customFont.setPixelSize(22); QQuickApplicationWindow *window = helper.appWindow; |