diff options
author | Andy Shaw <andy.shaw@qt.io> | 2018-09-15 00:12:42 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2018-11-08 16:08:25 +0000 |
commit | 97f73e957756753b09a778daf2ee8f0ddb97f746 (patch) | |
tree | db2528cfadd1f3556143ba9d319867c3ce465c0a /src/corelib/serialization | |
parent | db3777dd50210467aac44a152cb4dae8bb16c422 (diff) |
Handle fonts that have commas/quotes in the family name
Since the comma character was originally used as a separator, we
need to extend QFont to have setFamilies() so that we can avoid
joining the family strings together. This enables us to see the
family name as a single string and for multiple family names,
we have families().
Subsequently, this has added functions to QTextCharFormat to
account for multiple font families too. So it is now possible to
set a single one directly with setFontFamily() and multiple ones
with setFontFamilies().
This also bumps up the datastream version to 19 as QFont now
streams the families list as well.
[ChangeLog][QtGui][QFont] Add setFamilies()/families() to aid using of font families with commas and quotes in their name.
[ChangeLog][Important Behavior Changes] QDataStream version bumped up to 19 to account for changes in the serialization of QFont.
Fixes: QTBUG-46322
Change-Id: Iee9f715e47544a7a705c7f36401aba216a7d42b0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/corelib/serialization')
-rw-r--r-- | src/corelib/serialization/qdatastream.cpp | 2 | ||||
-rw-r--r-- | src/corelib/serialization/qdatastream.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/serialization/qdatastream.cpp b/src/corelib/serialization/qdatastream.cpp index 8566b4fd56..01808ebce6 100644 --- a/src/corelib/serialization/qdatastream.cpp +++ b/src/corelib/serialization/qdatastream.cpp @@ -559,7 +559,7 @@ void QDataStream::setByteOrder(ByteOrder bo) \value Qt_5_10 Same as Qt_5_6 \value Qt_5_11 Same as Qt_5_6 \value Qt_5_12 Version 18 (Qt 5.12) - \value Qt_5_13 Same as Qt_5_12 + \value Qt_5_13 Version 19 (Qt 5.13) \omitvalue Qt_DefaultCompiledVersion \sa setVersion(), version() diff --git a/src/corelib/serialization/qdatastream.h b/src/corelib/serialization/qdatastream.h index ad69621bbe..2c874700e4 100644 --- a/src/corelib/serialization/qdatastream.h +++ b/src/corelib/serialization/qdatastream.h @@ -99,7 +99,7 @@ public: Qt_5_10 = Qt_5_9, Qt_5_11 = Qt_5_10, Qt_5_12 = 18, - Qt_5_13 = Qt_5_12, + Qt_5_13 = 19, #if QT_VERSION >= 0x050e00 #error Add the datastream version for this Qt version and update Qt_DefaultCompiledVersion #endif |