summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextformat.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-02-07 12:44:03 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-03-10 10:58:03 +0100
commit761197e9d29f233dabb45d8adbed56725870348a (patch)
treeb591391ac15f50e41cca8ac09b700659f21dc229 /src/gui/text/qtextformat.h
parent1ef8470c805faf39e95ee8652cf473c231471eef (diff)
Fix distribution of font properties in QTextFormat
The area reserved for font properties was too small for the properties we needed, and as a result font properties were added outside of the area and special-cased (in the case of FontLetterSpacingType) or ignored (in the case of FontStretch) by conditions that check if the property is within the designated area. We reorganize the enum values now that we can, and allocate some more space for the font properties area. Fixes: QTBUG-65345 Change-Id: I8121ff7f72102d8022c6a6d2f8ed9c35dcdbb321 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/gui/text/qtextformat.h')
-rw-r--r--src/gui/text/qtextformat.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/text/qtextformat.h b/src/gui/text/qtextformat.h
index 28da0fe344..b4db18289e 100644
--- a/src/gui/text/qtextformat.h
+++ b/src/gui/text/qtextformat.h
@@ -184,16 +184,16 @@ public:
// character properties
FirstFontProperty = 0x1FE0,
FontCapitalization = FirstFontProperty,
- FontLetterSpacingType = 0x2033,
FontLetterSpacing = 0x1FE1,
FontWordSpacing = 0x1FE2,
- FontStretch = 0x2034,
FontStyleHint = 0x1FE3,
FontStyleStrategy = 0x1FE4,
FontKerning = 0x1FE5,
FontHintingPreference = 0x1FE6,
FontFamilies = 0x1FE7,
FontStyleName = 0x1FE8,
+ FontLetterSpacingType = 0x1FE9,
+ FontStretch = 0x1FEA,
FontFamily = 0x2000,
FontPointSize = 0x2001,
FontSizeAdjustment = 0x2002,
@@ -207,7 +207,7 @@ public:
FontPixelSize = 0x2009,
LastFontProperty = FontPixelSize,
- TextUnderlineColor = 0x2010,
+ TextUnderlineColor = 0x2020,
TextVerticalAlignment = 0x2021,
TextOutline = 0x2022,
TextUnderlineStyle = 0x2023,
@@ -216,6 +216,12 @@ public:
IsAnchor = 0x2030,
AnchorHref = 0x2031,
AnchorName = 0x2032,
+
+ // Included for backwards compatibility with old QDataStreams.
+ // Should not be referenced in user code.
+ OldFontLetterSpacingType = 0x2033,
+ OldFontStretch = 0x2034,
+
ObjectType = 0x2f00,
// list properties