summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontinfo.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-11-03 11:16:30 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-11-03 13:06:14 +0100
commit7d875b4306dbd144afb332389e75dba331986cca (patch)
tree528d487b930adc62da18833e6c50adb810624ce0 /src/gui/text/qfontinfo.h
parent9a50d62039179346b2d7f6de2756c912c1fd1dec (diff)
Add deprecated accessors for legacy font weight
In 3558704ed5c3d2c6dc6d024dfa454997469ca75f we changed the font weights to use the OpenType weights rather than our own non-standard scale. This can cause difficulty for people who have legacy font weights stored as ints and no way to convert them. Therefore, we add accessors for the legacy font weights to ease the transition. Change-Id: I2a591c62895dfa1a2310d9a2d0cdcf08de08f3a4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/text/qfontinfo.h')
-rw-r--r--src/gui/text/qfontinfo.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/text/qfontinfo.h b/src/gui/text/qfontinfo.h
index dfdac221cb..ed889c2fb5 100644
--- a/src/gui/text/qfontinfo.h
+++ b/src/gui/text/qfontinfo.h
@@ -73,6 +73,10 @@ public:
bool fixedPitch() const;
QFont::StyleHint styleHint() const;
+#if QT_DEPRECATED_SINCE(6, 0)
+ QT_DEPRECATED_VERSION_X_6_0("Use weight() instead") int legacyWeight() const;
+#endif
+
bool exactMatch() const;
private: