From aece0a13569737bbcced0e73c0e0b12863e2cf1f Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 16 Dec 2018 14:46:49 +0100 Subject: QColor: mark light()/dark() as deprecated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Eirik Aavitsland --- src/gui/painting/qcolor.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/gui/painting/qcolor.h') 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 -- cgit v1.2.3