diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2012-03-20 11:57:35 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-21 09:00:22 +0100 |
commit | 2cc5442b0263a449f4f5eb0cbf99e419ee0d0d38 (patch) | |
tree | 50104f6658f49a69cb71994132fdfb43792b8c76 /tests/auto/gui | |
parent | 7f18dbc30c86464f8b86d8ab82966a40f5834fcf (diff) |
Remove hardcoded font names in QFont::defaultFamily()
QFont::defaultFamily() should not use any hardcoded font names like
"Helvetica" or "Times" as they might not be present in certain systems,
it should rather use abstract names like "sans-serif", "serif" and
"monospace" then let the platform plugin to decide which font map to
them.
Change-Id: I5aafb103a5238c17b10773711ad504806c6fc3ce
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r-- | tests/auto/gui/text/qfont/tst_qfont.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp index ead4c8e71a..1cedfa5c01 100644 --- a/tests/auto/gui/text/qfont/tst_qfont.cpp +++ b/tests/auto/gui/text/qfont/tst_qfont.cpp @@ -630,13 +630,12 @@ void tst_QFont::defaultFamily_data() QTest::addColumn<QFont::StyleHint>("styleHint"); QTest::addColumn<QString>("defaultFamily"); - QTest::newRow("serif") << QFont::Times << "Times"; - QTest::newRow("courier") << QFont::Courier << "Courier"; - QTest::newRow("monospace") << QFont::Monospace << "Courier New"; - QTest::newRow("cursive") << QFont::Cursive << "Comic Sans MS"; - QTest::newRow("fantasy") << QFont::Fantasy << "Impact"; - QTest::newRow("old english") << QFont::OldEnglish<< "Old English"; - QTest::newRow("sans-serif") << QFont::Helvetica << "Helvetica"; + QTest::newRow("serif") << QFont::Times << "serif"; + QTest::newRow("monospace") << QFont::Monospace << "monospace"; + QTest::newRow("sans-serif") << QFont::SansSerif << "sans-serif"; + QTest::newRow("cursive") << QFont::Cursive << "cursive"; + QTest::newRow("fantasy") << QFont::Fantasy << "fantasy"; + QTest::newRow("old english") << QFont::OldEnglish << "Old English"; } void tst_QFont::defaultFamily() |