summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-04-18 16:22:46 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-04-20 05:40:59 +0000
commit3dcc075f4a5efce348a6fa00cf5a0adef97b1089 (patch)
tree5739f64af10ac72ad4fb147f7fdcb92b440a8622 /src/gui
parent870964895baadd013570d626d9e8ebc9d57fee94 (diff)
Move Q_REQUIRED_RESULT to its correct position
That's before the return type or static, inline, constexpr or such keywords (if any). Perl Script: s/^(\s+)(.*) Q_REQUIRED_RESULT(;)?(\s*\/\/.*)?$/\1Q_REQUIRED_RESULT \2\3\4/ Change-Id: I7814054a102a407d876ffffd14b6a16182f159e2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qimage.h8
-rw-r--r--src/gui/math3d/qgenericmatrix.h2
-rw-r--r--src/gui/math3d/qquaternion.h6
-rw-r--r--src/gui/math3d/qvector2d.h2
-rw-r--r--src/gui/math3d/qvector4d.h2
-rw-r--r--src/gui/painting/qcolor.h10
-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
11 files changed, 50 insertions, 50 deletions
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index 204e7a54b2..225ef3d2e8 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -179,9 +179,9 @@ public:
Format format() const;
#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(QT_COMPILING_QIMAGE_COMPAT_CPP)
- Q_ALWAYS_INLINE QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) const & Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) const &
{ return convertToFormat_helper(f, flags); }
- Q_ALWAYS_INLINE QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) && Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) &&
{
if (convertToFormat_inplace(f, flags))
return std::move(*this);
@@ -189,9 +189,9 @@ public:
return convertToFormat_helper(f, flags);
}
#else
- QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) const;
#endif
- QImage convertToFormat(Format f, const QVector<QRgb> &colorTable, Qt::ImageConversionFlags flags = Qt::AutoColor) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QImage convertToFormat(Format f, const QVector<QRgb> &colorTable, Qt::ImageConversionFlags flags = Qt::AutoColor) const;
bool reinterpretAsFormat(Format f);
int width() const;
diff --git a/src/gui/math3d/qgenericmatrix.h b/src/gui/math3d/qgenericmatrix.h
index 9a1ab54124..6a2a9e5bae 100644
--- a/src/gui/math3d/qgenericmatrix.h
+++ b/src/gui/math3d/qgenericmatrix.h
@@ -64,7 +64,7 @@ public:
void fill(T value);
- QGenericMatrix<M, N, T> transposed() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QGenericMatrix<M, N, T> transposed() const;
QGenericMatrix<N, M, T>& operator+=(const QGenericMatrix<N, M, T>& other);
QGenericMatrix<N, M, T>& operator-=(const QGenericMatrix<N, M, T>& other);
diff --git a/src/gui/math3d/qquaternion.h b/src/gui/math3d/qquaternion.h
index eff427117f..7f7f89db4d 100644
--- a/src/gui/math3d/qquaternion.h
+++ b/src/gui/math3d/qquaternion.h
@@ -90,14 +90,14 @@ public:
float length() const;
float lengthSquared() const;
- QQuaternion normalized() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QQuaternion normalized() const;
void normalize();
inline QQuaternion inverted() const;
- QQuaternion conjugated() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QQuaternion conjugated() const;
#if QT_DEPRECATED_SINCE(5, 5)
- QT_DEPRECATED QQuaternion conjugate() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QT_DEPRECATED QQuaternion conjugate() const;
#endif
QVector3D rotatedVector(const QVector3D& vector) const;
diff --git a/src/gui/math3d/qvector2d.h b/src/gui/math3d/qvector2d.h
index bdb56c9c1f..5e0394b998 100644
--- a/src/gui/math3d/qvector2d.h
+++ b/src/gui/math3d/qvector2d.h
@@ -82,7 +82,7 @@ public:
float length() const;
float lengthSquared() const; //In Qt 6 convert to inline and constexpr
- QVector2D normalized() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QVector2D normalized() const;
void normalize();
float distanceToPoint(const QVector2D &point) const;
diff --git a/src/gui/math3d/qvector4d.h b/src/gui/math3d/qvector4d.h
index f63b2f141b..be373aa806 100644
--- a/src/gui/math3d/qvector4d.h
+++ b/src/gui/math3d/qvector4d.h
@@ -88,7 +88,7 @@ public:
float length() const;
float lengthSquared() const; //In Qt 6 convert to inline and constexpr
- QVector4D normalized() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QVector4D normalized() const;
void normalize();
QVector4D &operator+=(const QVector4D &vector);
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index 22fcbcb2a8..83a93e25ea 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -191,7 +191,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;
@@ -211,10 +211,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/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);