From 62882ad2fe3d9f70c876d7a51a5aab4118ce1ba3 Mon Sep 17 00:00:00 2001 From: David Faure Date: Tue, 10 Jan 2017 12:04:07 +0100 Subject: 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 Reviewed-by: Konstantin Shegunov --- tests/auto/gui/text/qfont/tst_qfont.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/auto/gui/text/qfont') diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp index a6d8944656..06c0ba0819 100644 --- a/tests/auto/gui/text/qfont/tst_qfont.cpp +++ b/tests/auto/gui/text/qfont/tst_qfont.cpp @@ -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; -- cgit v1.2.3