tst_qfont: clear style name in test font

The test failed if qApp->font() had a styleName() set,
when testing old serialization formats which didn't serialize it.

Change-Id: If0236d354be144b3a990e074a22f796fffb1ed18
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
This commit is contained in:
David Faure 2017-01-10 12:04:07 +01:00
parent 8b64f93362
commit 62882ad2fe

View File

@ -358,6 +358,8 @@ void tst_QFont::serialize_data()
// Versions <= Qt 2.1 had broken point size serialization,
// so we set an integer point size.
basicFont.setPointSize(9);
// Versions <= Qt 5.4 didn't serialize styleName, so clear it
basicFont.setStyleName(QString());
QFont font = basicFont;
QTest::newRow("defaultConstructed") << font << QDataStream::Qt_1_0;