summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qcolor.h
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2014-03-18 00:38:56 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-02 10:03:46 +0200
commit0ccbe33a0453902264beefaaec22a0ec74cba678 (patch)
tree1065ae64cdb871dc1b97f573225fc21502072090 /src/gui/painting/qcolor.h
parent84f02a9e144095bb5ecb89e7accada83ff415523 (diff)
QtGui: Use Q_REQUIRED_RESULT in many more places
gcc doesn't yet warn when a non-POD return datatype is unused, but clang does, at least. Change-Id: Ia4c39001994ac09cf20e458bc5a66710bd11780c Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/gui/painting/qcolor.h')
-rw-r--r--src/gui/painting/qcolor.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index 1ede5a3682..e5de2678a4 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -173,7 +173,7 @@ public:
QColor toCmyk() const;
QColor toHsl() const;
- QColor convertTo(Spec colorSpec) const;
+ QColor convertTo(Spec colorSpec) const Q_REQUIRED_RESULT;
static QColor fromRgb(QRgb rgb);
static QColor fromRgba(QRgb rgba);
@@ -190,10 +190,10 @@ 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);
- QColor light(int f = 150) const;
- QColor lighter(int f = 150) const;
- QColor dark(int f = 200) const;
- QColor darker(int f = 200) const;
+ QColor light(int f = 150) const Q_REQUIRED_RESULT;
+ QColor lighter(int f = 150) const Q_REQUIRED_RESULT;
+ QColor dark(int f = 200) const Q_REQUIRED_RESULT;
+ QColor darker(int f = 200) const Q_REQUIRED_RESULT;
QColor &operator=(const QColor &);
QColor &operator=(Qt::GlobalColor color);