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>
bb10
Sérgio Martins 2015-05-03 17:16:54 +01:00
parent ec73b5d4b8
commit f44f2136e0
9 changed files with 21 additions and 21 deletions

View File

@ -186,7 +186,7 @@ public:
QString url(FormattingOptions options = FormattingOptions(PrettyDecoded)) const;
QString toString(FormattingOptions options = FormattingOptions(PrettyDecoded)) const;
QString toDisplayString(FormattingOptions options = FormattingOptions(PrettyDecoded)) const;
QUrl adjusted(FormattingOptions options) const;
QUrl adjusted(FormattingOptions options) const Q_REQUIRED_RESULT;
QByteArray toEncoded(FormattingOptions options = FullyEncoded) const;
static QUrl fromEncoded(const QByteArray &url, ParsingMode mode = TolerantMode);
@ -243,7 +243,7 @@ public:
QString fragment(ComponentFormattingOptions options = PrettyDecoded) const;
void setFragment(const QString &fragment, ParsingMode mode = TolerantMode);
QUrl resolved(const QUrl &relative) const;
QUrl resolved(const QUrl &relative) const Q_REQUIRED_RESULT;
bool isRelative() const;
bool isParentOf(const QUrl &url) const;

View File

@ -54,7 +54,7 @@ public:
Q_DECL_RELAXED_CONSTEXPR inline void setWidth(int w) Q_DECL_NOTHROW;
Q_DECL_RELAXED_CONSTEXPR inline void setHeight(int h) Q_DECL_NOTHROW;
void transpose() Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR inline QSize transposed() const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR inline QSize transposed() const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
inline void scale(int w, int h, Qt::AspectRatioMode mode) Q_DECL_NOTHROW;
inline void scale(const QSize &s, Qt::AspectRatioMode mode) Q_DECL_NOTHROW;

View File

@ -495,7 +495,7 @@ public:
};
QString normalized(NormalizationForm mode, QChar::UnicodeVersion version = QChar::Unicode_Unassigned) const Q_REQUIRED_RESULT;
QString repeated(int times) const;
QString repeated(int times) const Q_REQUIRED_RESULT;
const ushort *utf16() const;

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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) {}