diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-09-23 10:09:42 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-09-25 07:10:45 +0200 |
commit | c2be9180b7430221e9136afb1a8c2a752ac2710f (patch) | |
tree | 5b390c53f4744c7bd4faeaf4d3a12d77ce3c0ba7 /src/gui/painting/qcolor.h | |
parent | 31a1b3280cf076fcdb45a658d0140af3737be138 (diff) |
Replace Q_REQUIRED_RESULT with [[nodiscard]]
It was already used many places directly making the code inconsistent.
Change-Id: I3b14bc6c333640fb3ba33c71eba97e78c973e44b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/painting/qcolor.h')
-rw-r--r-- | src/gui/painting/qcolor.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h index d8269974be..03129e8241 100644 --- a/src/gui/painting/qcolor.h +++ b/src/gui/painting/qcolor.h @@ -195,7 +195,7 @@ public: QColor toHsl() const noexcept; QColor toExtendedRgb() const noexcept; - Q_REQUIRED_RESULT QColor convertTo(Spec colorSpec) const noexcept; + [[nodiscard]] QColor convertTo(Spec colorSpec) const noexcept; static QColor fromRgb(QRgb rgb) noexcept; static QColor fromRgba(QRgb rgba) noexcept; @@ -215,8 +215,8 @@ public: static QColor fromHsl(int h, int s, int l, int a = 255); static QColor fromHslF(float h, float s, float l, float a = 1.0); - Q_REQUIRED_RESULT QColor lighter(int f = 150) const noexcept; - Q_REQUIRED_RESULT QColor darker(int f = 200) const noexcept; + [[nodiscard]] QColor lighter(int f = 150) const noexcept; + [[nodiscard]] QColor darker(int f = 200) const noexcept; bool operator==(const QColor &c) const noexcept; bool operator!=(const QColor &c) const noexcept; |