Ensure that tst_QFontDatabase::addAppFont() tests the whole path to an engine
Change-Id: Ie22cd9d7d362de86e02b841d40d75eac46395952 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
5090fd5018
commit
e9af32fcd4
@ -244,8 +244,13 @@ void tst_QFontDatabase::addAppFont()
|
||||
QVERIFY(!newFamilies.isEmpty());
|
||||
QVERIFY(newFamilies.count() >= oldFamilies.count());
|
||||
|
||||
for (int i = 0; i < addedFamilies.count(); ++i)
|
||||
QVERIFY(newFamilies.contains(addedFamilies.at(i)));
|
||||
for (int i = 0; i < addedFamilies.count(); ++i) {
|
||||
QString family = addedFamilies.at(i);
|
||||
QVERIFY(newFamilies.contains(family));
|
||||
QFont qfont(family);
|
||||
QFontInfo fi(qfont);
|
||||
QCOMPARE(fi.family(), family);
|
||||
}
|
||||
|
||||
QVERIFY(QFontDatabase::removeApplicationFont(id));
|
||||
QCOMPARE(fontDbChangedSpy.count(), 2);
|
||||
|
Loading…
Reference in New Issue
Block a user