diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-09-23 10:09:42 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-09-25 07:10:45 +0200 |
commit | c2be9180b7430221e9136afb1a8c2a752ac2710f (patch) | |
tree | 5b390c53f4744c7bd4faeaf4d3a12d77ce3c0ba7 /src/corelib/tools/qline.h | |
parent | 31a1b3280cf076fcdb45a658d0140af3737be138 (diff) |
Replace Q_REQUIRED_RESULT with [[nodiscard]]
It was already used many places directly making the code inconsistent.
Change-Id: I3b14bc6c333640fb3ba33c71eba97e78c973e44b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/tools/qline.h')
-rw-r--r-- | src/corelib/tools/qline.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/corelib/tools/qline.h b/src/corelib/tools/qline.h index c3fb2fd5f5..adef545d86 100644 --- a/src/corelib/tools/qline.h +++ b/src/corelib/tools/qline.h @@ -75,10 +75,10 @@ public: inline void translate(const QPoint &p); inline void translate(int dx, int dy); - Q_REQUIRED_RESULT constexpr inline QLine translated(const QPoint &p) const; - Q_REQUIRED_RESULT constexpr inline QLine translated(int dx, int dy) const; + [[nodiscard]] constexpr inline QLine translated(const QPoint &p) const; + [[nodiscard]] constexpr inline QLine translated(int dx, int dy) const; - Q_REQUIRED_RESULT constexpr inline QPoint center() const; + [[nodiscard]] constexpr inline QPoint center() const; inline void setP1(const QPoint &p1); inline void setP2(const QPoint &p2); @@ -225,7 +225,7 @@ public: constexpr inline QLineF(qreal x1, qreal y1, qreal x2, qreal y2); constexpr inline QLineF(const QLine &line) : pt1(line.p1()), pt2(line.p2()) { } - Q_REQUIRED_RESULT static QLineF fromPolar(qreal length, qreal angle); + [[nodiscard]] static QLineF fromPolar(qreal length, qreal angle); constexpr bool isNull() const; @@ -249,8 +249,8 @@ public: qreal angleTo(const QLineF &l) const; - Q_REQUIRED_RESULT QLineF unitVector() const; - Q_REQUIRED_RESULT constexpr inline QLineF normalVector() const; + [[nodiscard]] QLineF unitVector() const; + [[nodiscard]] constexpr inline QLineF normalVector() const; IntersectionType intersects(const QLineF &l, QPointF *intersectionPoint = nullptr) const; @@ -258,10 +258,10 @@ public: inline void translate(const QPointF &p); inline void translate(qreal dx, qreal dy); - Q_REQUIRED_RESULT constexpr inline QLineF translated(const QPointF &p) const; - Q_REQUIRED_RESULT constexpr inline QLineF translated(qreal dx, qreal dy) const; + [[nodiscard]] constexpr inline QLineF translated(const QPointF &p) const; + [[nodiscard]] constexpr inline QLineF translated(qreal dx, qreal dy) const; - Q_REQUIRED_RESULT constexpr inline QPointF center() const; + [[nodiscard]] constexpr inline QPointF center() const; inline void setP1(const QPointF &p1); inline void setP2(const QPointF &p2); |