mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
reuse QFontDatabase object in tst_QCssParser::extractFontFamily_data()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
bc46d5aede
commit
279e569c51
1 changed files with 3 additions and 2 deletions
|
@ -1498,13 +1498,14 @@ void tst_QCssParser::gradient()
|
|||
|
||||
void tst_QCssParser::extractFontFamily_data()
|
||||
{
|
||||
if (!QFontDatabase().hasFamily("FreeSerif"))
|
||||
QFontDatabase fontdb;
|
||||
if (!fontdb.hasFamily("FreeSerif"))
|
||||
QSKIP("'FreeSerif' font not found ", SkipAll);
|
||||
|
||||
QTest::addColumn<QString>("css");
|
||||
QTest::addColumn<QString>("expectedFamily");
|
||||
|
||||
const QString invalidfamily = QFontDatabase().font("invalid font", "invalid style", 12).family();
|
||||
const QString invalidfamily = fontdb.font("invalid font", "invalid style", 12).family();
|
||||
QTest::newRow("unquoted-family-name") << "font-family: FreeSerif" << QString("FreeSerif");
|
||||
QTest::newRow("quoted-family-name") << "font-family: 'FreeSerif'" << QString("FreeSerif");
|
||||
QTest::newRow("quoted-family-name2") << "font-family: \"FreeSerif\"" << QString("FreeSerif");
|
||||
|
|
Loading…
Add table
Reference in a new issue