summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfontcombobox/tst_qfontcombobox.cpp
diff options
context:
space:
mode:
authorThomas Zander <t.zander@nokia.com>2010-01-05 12:24:44 (GMT)
committerThomas Zander <t.zander@nokia.com>2010-01-05 13:27:50 (GMT)
commitb8f7adab5a146bea04d598299c04570fe95caedc (patch)
tree00990bfa40753b02aea9fe015b4afb04ce9919d4 /tests/auto/qfontcombobox/tst_qfontcombobox.cpp
parentbb3428531e31ac30a6b04ecc7e3192909108e6a7 (diff)
downloadQt-b8f7adab5a146bea04d598299c04570fe95caedc.zip
Qt-b8f7adab5a146bea04d598299c04570fe95caedc.tar.gz
Qt-b8f7adab5a146bea04d598299c04570fe95caedc.tar.bz2
Make unit test more robust
Make sure that on systems that have a default font of "Sans Serif" (or another not really existing font name) the unit test doesn't fail. Reviewed-By: Simon Hausmann Reviewed-By: Olivier
Diffstat (limited to 'tests/auto/qfontcombobox/tst_qfontcombobox.cpp')
-rw-r--r--tests/auto/qfontcombobox/tst_qfontcombobox.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/qfontcombobox/tst_qfontcombobox.cpp b/tests/auto/qfontcombobox/tst_qfontcombobox.cpp
index 657be06..73dfe076 100644
--- a/tests/auto/qfontcombobox/tst_qfontcombobox.cpp
+++ b/tests/auto/qfontcombobox/tst_qfontcombobox.cpp
@@ -123,9 +123,11 @@ void tst_QFontComboBox::currentFont_data()
QTest::addColumn<QFont>("currentFont");
// Normalize the names
QFont defaultFont;
+ QFontInfo fi(defaultFont);
+ defaultFont = QFont(fi.family()); // make sure we have a real font name and not something like 'Sans Serif'.
QTest::newRow("default") << defaultFont;
defaultFont.setPointSize(defaultFont.pointSize() + 10);
- QTest::newRow("default") << defaultFont;
+ QTest::newRow("default2") << defaultFont;
QFontDatabase db;
QStringList list = db.families();
for (int i = 0; i < list.count(); ++i) {