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:
parent
8b64f93362
commit
62882ad2fe
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user