summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qcolor.h
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-12-16 14:46:49 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-12-24 11:58:53 +0000
commitaece0a13569737bbcced0e73c0e0b12863e2cf1f (patch)
tree8b12127f9afb37ced13e8f4193402f901ca84266 /src/gui/painting/qcolor.h
parentf03941e4113e2c8c0a594592be44efc92614ec9d (diff)
QColor: mark light()/dark() as deprecated
QColor::light()/dark() are deprecated since Qt4 times. Therefore annotate them with Q_DEPRECATED so they can be removed in Qt6. Change-Id: Ifbfc59d6a070670a43c9b60a23f83cc4ba59bf07 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/painting/qcolor.h')
-rw-r--r--src/gui/painting/qcolor.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index a9b05ae7e3..4822612cf8 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -219,9 +219,13 @@ public:
static QColor fromHsl(int h, int s, int l, int a = 255);
static QColor fromHslF(qreal h, qreal s, qreal l, qreal a = 1.0);
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X("Use QColor::lighter() instead")
Q_REQUIRED_RESULT QColor light(int f = 150) const Q_DECL_NOTHROW;
- Q_REQUIRED_RESULT QColor lighter(int f = 150) const Q_DECL_NOTHROW;
+ QT_DEPRECATED_X("Use QColor::darker() instead")
Q_REQUIRED_RESULT QColor dark(int f = 200) const Q_DECL_NOTHROW;
+#endif
+ Q_REQUIRED_RESULT QColor lighter(int f = 150) const Q_DECL_NOTHROW;
Q_REQUIRED_RESULT QColor darker(int f = 200) const Q_DECL_NOTHROW;
bool operator==(const QColor &c) const Q_DECL_NOTHROW;
@@ -308,12 +312,6 @@ inline QColor::QColor(const QColor &acolor) Q_DECL_NOTHROW
inline bool QColor::isValid() const Q_DECL_NOTHROW
{ return cspec != Invalid; }
-inline QColor QColor::lighter(int f) const Q_DECL_NOTHROW
-{ return light(f); }
-
-inline QColor QColor::darker(int f) const Q_DECL_NOTHROW
-{ return dark(f); }
-
QT_END_NAMESPACE
#endif // QCOLOR_H