summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2015-05-03 17:16:54 +0100
committerSérgio Martins <sergio.martins@kdab.com>2015-05-04 13:57:47 +0000
commitf44f2136e07bfea792a7aafd7c2058eac0ba595d (patch)
treede00cb415a71fd4624d00eea95ec21b924d58a93 /src/gui
parentec73b5d4b83df954ea68076c51e8ab6a85477a0d (diff)
Add Q_REQUIRED_RESULT in several places
Change-Id: Icda3000f1d9f0d41612a50a816aa5de5e32028d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/math3d/qgenericmatrix.h2
-rw-r--r--src/gui/math3d/qquaternion.h4
-rw-r--r--src/gui/math3d/qvector2d.h2
-rw-r--r--src/gui/math3d/qvector4d.h2
-rw-r--r--src/gui/painting/qpainterpath.h16
-rw-r--r--src/gui/painting/qpolygon.h8
6 files changed, 17 insertions, 17 deletions
diff --git a/src/gui/math3d/qgenericmatrix.h b/src/gui/math3d/qgenericmatrix.h
index c08faaaa8b..19809056fd 100644
--- a/src/gui/math3d/qgenericmatrix.h
+++ b/src/gui/math3d/qgenericmatrix.h
@@ -57,7 +57,7 @@ public:
void fill(T value);
- QGenericMatrix<M, N, T> transposed() const;
+ QGenericMatrix<M, N, T> transposed() const Q_REQUIRED_RESULT;
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 6bed397893..95ce5ce6d0 100644
--- a/src/gui/math3d/qquaternion.h
+++ b/src/gui/math3d/qquaternion.h
@@ -83,12 +83,12 @@ public:
float length() const;
float lengthSquared() const;
- QQuaternion normalized() const;
+ QQuaternion normalized() const Q_REQUIRED_RESULT;
void normalize();
inline QQuaternion inverted() const;
- QQuaternion conjugate() const;
+ QQuaternion conjugate() const Q_REQUIRED_RESULT;
QVector3D rotatedVector(const QVector3D& vector) const;
diff --git a/src/gui/math3d/qvector2d.h b/src/gui/math3d/qvector2d.h
index 20264fa84f..137142f381 100644
--- a/src/gui/math3d/qvector2d.h
+++ b/src/gui/math3d/qvector2d.h
@@ -75,7 +75,7 @@ public:
float length() const;
float lengthSquared() const; //In Qt 6 convert to inline and constexpr
- QVector2D normalized() const;
+ QVector2D normalized() const Q_REQUIRED_RESULT;
void normalize();
float distanceToPoint(const QVector2D &point) const;
diff --git a/src/gui/math3d/qvector4d.h b/src/gui/math3d/qvector4d.h
index aa69104f55..72db8ac754 100644
--- a/src/gui/math3d/qvector4d.h
+++ b/src/gui/math3d/qvector4d.h
@@ -81,7 +81,7 @@ public:
float length() const;
float lengthSquared() const; //In Qt 6 convert to inline and constexpr
- QVector4D normalized() const;
+ QVector4D normalized() const Q_REQUIRED_RESULT;
void normalize();
QVector4D &operator+=(const QVector4D &vector);
diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h
index e037cd5bfb..4a7bd98234 100644
--- a/src/gui/painting/qpainterpath.h
+++ b/src/gui/painting/qpainterpath.h
@@ -147,8 +147,8 @@ public:
void translate(qreal dx, qreal dy);
inline void translate(const QPointF &offset);
- QPainterPath translated(qreal dx, qreal dy) const;
- inline QPainterPath translated(const QPointF &offset) const;
+ QPainterPath translated(qreal dx, qreal dy) const Q_REQUIRED_RESULT;
+ inline QPainterPath translated(const QPointF &offset) const Q_REQUIRED_RESULT;
QRectF boundingRect() const;
QRectF controlPointRect() const;
@@ -158,7 +158,7 @@ public:
bool isEmpty() const;
- QPainterPath toReversed() const;
+ QPainterPath toReversed() const Q_REQUIRED_RESULT;
QList<QPolygonF> toSubpathPolygons(const QMatrix &matrix = QMatrix()) const;
QList<QPolygonF> toFillPolygons(const QMatrix &matrix = QMatrix()) const;
QPolygonF toFillPolygon(const QMatrix &matrix = QMatrix()) const;
@@ -178,12 +178,12 @@ public:
bool intersects(const QPainterPath &p) const;
bool contains(const QPainterPath &p) const;
- QPainterPath united(const QPainterPath &r) const;
- QPainterPath intersected(const QPainterPath &r) const;
- QPainterPath subtracted(const QPainterPath &r) const;
- QPainterPath subtractedInverted(const QPainterPath &r) 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;
- QPainterPath simplified() const;
+ QPainterPath simplified() const Q_REQUIRED_RESULT;
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 ee7d4d31ad..1549ebe2b5 100644
--- a/src/gui/painting/qpolygon.h
+++ b/src/gui/painting/qpolygon.h
@@ -138,7 +138,7 @@ public:
void translate(const QPointF &offset);
inline QPolygonF translated(qreal dx, qreal dy) const;
- QPolygonF translated(const QPointF &offset) const;
+ QPolygonF translated(const QPointF &offset) const Q_REQUIRED_RESULT;
QPolygon toPolygon() const;
@@ -148,9 +148,9 @@ public:
bool containsPoint(const QPointF &pt, Qt::FillRule fillRule) const;
- QPolygonF united(const QPolygonF &r) const;
- QPolygonF intersected(const QPolygonF &r) const;
- QPolygonF subtracted(const QPolygonF &r) 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;
};
inline QPolygonF::QPolygonF(int asize) : QVector<QPointF>(asize) {}