summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@nokia.com>2010-09-28 15:05:03 +0200
committerAlessandro Portale <alessandro.portale@nokia.com>2010-09-28 15:05:03 +0200
commit1341477e03dae2f9bc5ddb25beeb2ba3cd23358f (patch)
tree874527d55bb27fea9ed979dff7426d77e9a860e5 /tests
parent3e3ce984b54a0b199bf5d4f5e3dcb0a9d5b5bd79 (diff)
Implemeting, exporting and autotesting QFont::lastResortFont()
An implementation of QFont::lastResortFont() is still(!) missing in Qt 4.7.0. I only became aware of QTBUG-6921, lately. This patch... 1) implements QFont::lastResortFont() in qfont_s60.cpp by first trying to get the lastResortFamily() and then falling back to a hardcoded font. 2) updates the .def files with one additional entry 3) adds an autotest which verifies that lastResortFamily() does return a non-empty string. In the firt place, that autotest makes sure that lastResortFamily() is implemented and exported, so that something like this issue will not go unnoticed in the next Qt port. Task-number: QTBUG-6921 Reviewed-by: Eskil
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qfont/tst_qfont.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qfont/tst_qfont.cpp b/tests/auto/qfont/tst_qfont.cpp
index 7bda6653f9..296ed689bc 100644
--- a/tests/auto/qfont/tst_qfont.cpp
+++ b/tests/auto/qfont/tst_qfont.cpp
@@ -76,6 +76,7 @@ private slots:
void italicOblique();
void insertAndRemoveSubstitutions();
void serializeSpacing();
+ void lastResortFont();
};
// Testing get/set functions
@@ -593,5 +594,11 @@ void tst_QFont::serializeSpacing()
QCOMPARE(font3.wordSpacing(), 50.);
}
+void tst_QFont::lastResortFont()
+{
+ QFont font;
+ QVERIFY(!font.lastResortFont().isEmpty());
+}
+
QTEST_MAIN(tst_QFont)
#include "tst_qfont.moc"