summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-05-13 15:33:26 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-06-03 14:00:07 +0000
commitf04ed82ca2ca7b1e4e2bbb79bec02ce932e11e48 (patch)
tree2edfe6c57507ba3b6f3c9887e4f170a2dfcf1096 /tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
parent525a660ea3ea28437c6cca28cae937b71001a4e3 (diff)
Font definitions with different style names are not equal
Since we added font matching by style name, the style name is not just a derived property and should not be ignored in comparisons. The QFontDef::exactMatch comparison is left unchanged, since it tests if a loaded font matches a requested one. Task-number: QTBUG-30851 Change-Id: I4187c5b993815001f35bcf24dc449059bfdcba6f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp')
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
index bac72f0365..796b4b9fdb 100644
--- a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
+++ b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
@@ -225,6 +225,8 @@ void tst_QFontDialog::qtbug_41513_stylesheetStyle()
QFontDialog::DontUseNativeDialog);
QVERIFY(accepted);
+ // The fontdialog sets the styleName, when the fontdatabase knows the style name.
+ resultFont.setStyleName(testFont.styleName());
QCOMPARE(resultFont, testFont);
// reset stylesheet