summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-04-20 11:19:14 +0200
committerLiang Qi <liang.qi@qt.io>2017-04-20 12:31:27 +0200
commit7950b6b283549c98f1e0f981c84b68071a13b616 (patch)
treecf7281872045ebd57c68e10064ff0f400084aa13 /src/gui/painting
parent58d2927861d3e57cac4f6db599e209d2bfb17a2c (diff)
parent0794d61c822585530243f638687b8a75f0a15d0c (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/corelib/tools/qbytearray.h src/corelib/tools/qdatetime.h src/corelib/tools/qstring.h src/corelib/tools/qversionnumber.h src/plugins/platforms/android/qandroidplatformintegration.cpp tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qcolor.h10
-rw-r--r--src/gui/painting/qgrayraster.c6
-rw-r--r--src/gui/painting/qmatrix.h2
-rw-r--r--src/gui/painting/qpainterpath.h16
-rw-r--r--src/gui/painting/qpolygon.h18
-rw-r--r--src/gui/painting/qregion.h28
-rw-r--r--src/gui/painting/qtransform.h6
7 files changed, 41 insertions, 45 deletions
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index e254de6ad0..0c5ebcbda9 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -197,7 +197,7 @@ public:
QColor toCmyk() const Q_DECL_NOTHROW;
QColor toHsl() const Q_DECL_NOTHROW;
- QColor convertTo(Spec colorSpec) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QColor convertTo(Spec colorSpec) const Q_DECL_NOTHROW;
static QColor fromRgb(QRgb rgb) Q_DECL_NOTHROW;
static QColor fromRgba(QRgb rgba) Q_DECL_NOTHROW;
@@ -217,10 +217,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 Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- QColor lighter(int f = 150) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- QColor dark(int f = 200) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- QColor darker(int f = 200) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QColor light(int f = 150) const Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT QColor lighter(int f = 150) const Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT QColor dark(int f = 200) 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;
bool operator!=(const QColor &c) const Q_DECL_NOTHROW;
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c
index 7b35cd6143..0143e9b602 100644
--- a/src/gui/painting/qgrayraster.c
+++ b/src/gui/painting/qgrayraster.c
@@ -188,11 +188,7 @@ typedef ptrdiff_t QT_FT_PtrDist;
#include <stdlib.h>
#include <stdio.h>
- /* This macro is used to indicate that a function parameter is unused. */
- /* Its purpose is simply to reduce compiler warnings. Note also that */
- /* simply defining it as `(void)x' doesn't avoid warnings with certain */
- /* ANSI compilers (e.g. LCC). */
-#define QT_FT_UNUSED( x ) (x) = (x)
+#define QT_FT_UNUSED( x ) (void) x
#define QT_FT_TRACE5( x ) do { } while ( 0 ) /* nothing */
#define QT_FT_TRACE7( x ) do { } while ( 0 ) /* nothing */
diff --git a/src/gui/painting/qmatrix.h b/src/gui/painting/qmatrix.h
index 76bf61671c..15e0ab5be1 100644
--- a/src/gui/painting/qmatrix.h
+++ b/src/gui/painting/qmatrix.h
@@ -108,7 +108,7 @@ public:
bool isInvertible() const { return !qFuzzyIsNull(_m11*_m22 - _m12*_m21); }
qreal determinant() const { return _m11*_m22 - _m12*_m21; }
- QMatrix inverted(bool *invertible = Q_NULLPTR) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QMatrix inverted(bool *invertible = Q_NULLPTR) const;
bool operator==(const QMatrix &) const;
bool operator!=(const QMatrix &) const;
diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h
index 131fcde8cc..db39c1c5a0 100644
--- a/src/gui/painting/qpainterpath.h
+++ b/src/gui/painting/qpainterpath.h
@@ -154,8 +154,8 @@ public:
void translate(qreal dx, qreal dy);
inline void translate(const QPointF &offset);
- QPainterPath translated(qreal dx, qreal dy) const Q_REQUIRED_RESULT;
- inline QPainterPath translated(const QPointF &offset) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QPainterPath translated(qreal dx, qreal dy) const;
+ Q_REQUIRED_RESULT inline QPainterPath translated(const QPointF &offset) const;
QRectF boundingRect() const;
QRectF controlPointRect() const;
@@ -165,7 +165,7 @@ public:
bool isEmpty() const;
- QPainterPath toReversed() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QPainterPath toReversed() const;
QList<QPolygonF> toSubpathPolygons(const QMatrix &matrix = QMatrix()) const;
QList<QPolygonF> toFillPolygons(const QMatrix &matrix = QMatrix()) const;
QPolygonF toFillPolygon(const QMatrix &matrix = QMatrix()) const;
@@ -185,12 +185,12 @@ public:
bool intersects(const QPainterPath &p) const;
bool contains(const QPainterPath &p) const;
- QPainterPath united(const QPainterPath &r) const Q_REQUIRED_RESULT;
- QPainterPath intersected(const QPainterPath &r) const Q_REQUIRED_RESULT;
- QPainterPath subtracted(const QPainterPath &r) const Q_REQUIRED_RESULT;
- QPainterPath subtractedInverted(const QPainterPath &r) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QPainterPath united(const QPainterPath &r) const;
+ Q_REQUIRED_RESULT QPainterPath intersected(const QPainterPath &r) const;
+ Q_REQUIRED_RESULT QPainterPath subtracted(const QPainterPath &r) const;
+ Q_REQUIRED_RESULT QPainterPath subtractedInverted(const QPainterPath &r) const;
- QPainterPath simplified() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QPainterPath simplified() const;
bool operator==(const QPainterPath &other) const;
bool operator!=(const QPainterPath &other) const;
diff --git a/src/gui/painting/qpolygon.h b/src/gui/painting/qpolygon.h
index c57802e84e..f192e8d10b 100644
--- a/src/gui/painting/qpolygon.h
+++ b/src/gui/painting/qpolygon.h
@@ -78,8 +78,8 @@ public:
void translate(int dx, int dy);
void translate(const QPoint &offset);
- QPolygon translated(int dx, int dy) const Q_REQUIRED_RESULT;
- inline QPolygon translated(const QPoint &offset) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QPolygon translated(int dx, int dy) const;
+ Q_REQUIRED_RESULT inline QPolygon translated(const QPoint &offset) const;
QRect boundingRect() const;
@@ -95,9 +95,9 @@ public:
bool containsPoint(const QPoint &pt, Qt::FillRule fillRule) const;
- QPolygon united(const QPolygon &r) const Q_REQUIRED_RESULT;
- QPolygon intersected(const QPolygon &r) const Q_REQUIRED_RESULT;
- QPolygon subtracted(const QPolygon &r) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QPolygon united(const QPolygon &r) const;
+ Q_REQUIRED_RESULT QPolygon intersected(const QPolygon &r) const;
+ Q_REQUIRED_RESULT QPolygon subtracted(const QPolygon &r) const;
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QPolygon)
@@ -162,7 +162,7 @@ public:
void translate(const QPointF &offset);
inline QPolygonF translated(qreal dx, qreal dy) const;
- QPolygonF translated(const QPointF &offset) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QPolygonF translated(const QPointF &offset) const;
QPolygon toPolygon() const;
@@ -172,9 +172,9 @@ public:
bool containsPoint(const QPointF &pt, Qt::FillRule fillRule) const;
- QPolygonF united(const QPolygonF &r) const Q_REQUIRED_RESULT;
- QPolygonF intersected(const QPolygonF &r) const Q_REQUIRED_RESULT;
- QPolygonF subtracted(const QPolygonF &r) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QPolygonF united(const QPolygonF &r) const;
+ Q_REQUIRED_RESULT QPolygonF intersected(const QPolygonF &r) const;
+ Q_REQUIRED_RESULT QPolygonF subtracted(const QPolygonF &r) const;
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QPolygonF)
diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h
index 4f0a071da8..8dd7649447 100644
--- a/src/gui/painting/qregion.h
+++ b/src/gui/painting/qregion.h
@@ -99,23 +99,23 @@ public:
void translate(int dx, int dy);
inline void translate(const QPoint &p) { translate(p.x(), p.y()); }
- QRegion translated(int dx, int dy) const Q_REQUIRED_RESULT;
- inline QRegion translated(const QPoint &p) const Q_REQUIRED_RESULT { return translated(p.x(), p.y()); }
+ Q_REQUIRED_RESULT QRegion translated(int dx, int dy) const;
+ Q_REQUIRED_RESULT inline QRegion translated(const QPoint &p) const { return translated(p.x(), p.y()); }
- QRegion united(const QRegion &r) const Q_REQUIRED_RESULT;
- QRegion united(const QRect &r) const Q_REQUIRED_RESULT;
- QRegion intersected(const QRegion &r) const Q_REQUIRED_RESULT;
- QRegion intersected(const QRect &r) const Q_REQUIRED_RESULT;
- QRegion subtracted(const QRegion &r) const Q_REQUIRED_RESULT;
- QRegion xored(const QRegion &r) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QRegion united(const QRegion &r) const;
+ Q_REQUIRED_RESULT QRegion united(const QRect &r) const;
+ Q_REQUIRED_RESULT QRegion intersected(const QRegion &r) const;
+ Q_REQUIRED_RESULT QRegion intersected(const QRect &r) const;
+ Q_REQUIRED_RESULT QRegion subtracted(const QRegion &r) const;
+ Q_REQUIRED_RESULT QRegion xored(const QRegion &r) const;
#if QT_DEPRECATED_SINCE(5, 0)
- inline QT_DEPRECATED QRegion unite(const QRegion &r) const Q_REQUIRED_RESULT { return united(r); }
- inline QT_DEPRECATED QRegion unite(const QRect &r) const Q_REQUIRED_RESULT { return united(r); }
- inline QT_DEPRECATED QRegion intersect(const QRegion &r) const Q_REQUIRED_RESULT { return intersected(r); }
- inline QT_DEPRECATED QRegion intersect(const QRect &r) const Q_REQUIRED_RESULT { return intersected(r); }
- inline QT_DEPRECATED QRegion subtract(const QRegion &r) const Q_REQUIRED_RESULT { return subtracted(r); }
- inline QT_DEPRECATED QRegion eor(const QRegion &r) const Q_REQUIRED_RESULT { return xored(r); }
+ Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion unite(const QRegion &r) const { return united(r); }
+ Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion unite(const QRect &r) const { return united(r); }
+ Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion intersect(const QRegion &r) const { return intersected(r); }
+ Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion intersect(const QRect &r) const { return intersected(r); }
+ Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion subtract(const QRegion &r) const { return subtracted(r); }
+ Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion eor(const QRegion &r) const { return xored(r); }
#endif
bool intersects(const QRegion &r) const;
diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h
index 5ca1d46982..06ae611861 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -116,9 +116,9 @@ public:
qreal m21, qreal m22, qreal m23,
qreal m31, qreal m32, qreal m33);
- QTransform inverted(bool *invertible = Q_NULLPTR) const Q_REQUIRED_RESULT;
- QTransform adjoint() const Q_REQUIRED_RESULT;
- QTransform transposed() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QTransform inverted(bool *invertible = Q_NULLPTR) const;
+ Q_REQUIRED_RESULT QTransform adjoint() const;
+ Q_REQUIRED_RESULT QTransform transposed() const;
QTransform &translate(qreal dx, qreal dy);
QTransform &scale(qreal sx, qreal sy);