summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@theqtcompany.com>2015-09-01 03:03:28 +0200
committerMitch Curtis <mitch.curtis@theqtcompany.com>2015-09-15 13:30:09 +0000
commitd36a1dfb51af3f981262bc8e8fcd22b91aa890a6 (patch)
tree5c3486ac9b044e85f9c1a67214ff170be97e1882 /tests/auto
parent45bf434cdc3f24bac1131e1b423767e989b44d45 (diff)
Serialize the capitalization value of QFont
By serializing the capitalization value of QFont, it ensures that it is correctly preserved when QPicture streams it and later plays it back. Subsequently the QDataStream version has been bumped up to account for the change of the data format for serializing QFont. [ChangeLog][QtGui][QFont] QFont now serializes the capitalization setting. [ChangeLog][Important Behavior Changes] QDataStream version bumped up to 17 to account for changes in the serialization of QFont. Task-number: QTBUG-15214 Change-Id: I042680760e5a69d18d41e786b7500a3eebbe562f Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp4
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp5
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
index 2cf93e1c45..d9d3f55d4a 100644
--- a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
+++ b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
@@ -264,7 +264,9 @@ static int NColorRoles[] = {
QPalette::ToolTipText + 1, // Qt_5_2
QPalette::ToolTipText + 1, // Qt_5_3
QPalette::ToolTipText + 1, // Qt_5_4
- 0 // add the correct value for Qt_5_5 here later
+ QPalette::ToolTipText + 1, // Qt_5_5
+ QPalette::ToolTipText + 1, // Qt_5_6
+ 0 // add the correct value for Qt_5_7 here later
};
// Testing get/set functions
diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp
index 462e5115b4..84109441b9 100644
--- a/tests/auto/gui/text/qfont/tst_qfont.cpp
+++ b/tests/auto/gui/text/qfont/tst_qfont.cpp
@@ -608,6 +608,11 @@ void tst_QFont::serialize_data()
font.setStyleName("Regular Black Condensed");
// This wasn't read until 5.4.
QTest::newRow("styleName") << font << QDataStream::Qt_5_4;
+
+ font = basicFont;
+ font.setCapitalization(QFont::AllUppercase);
+ // This wasn't read until 5.6.
+ QTest::newRow("capitalization") << font << QDataStream::Qt_5_6;
}
void tst_QFont::serialize()