summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qpoint.h
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-09-04 14:33:40 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-09-16 09:41:23 +0200
commit93f2f33a49f6c96a4f94f344edf03164ed944d02 (patch)
tree9a799be282e6c0d6544d9f8c872073f83e6c0475 /src/corelib/tools/qpoint.h
parent7e8705f6632428a8d9a937ab5fe087999347b3dd (diff)
parentf255b1e8e297e7e1363921580007145cff574e0d (diff)
Merge "Merge remote-tracking branch 'origin/dev' into wip/qt6"
Diffstat (limited to 'src/corelib/tools/qpoint.h')
-rw-r--r--src/corelib/tools/qpoint.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/tools/qpoint.h b/src/corelib/tools/qpoint.h
index 34df673b93..fe952f95da 100644
--- a/src/corelib/tools/qpoint.h
+++ b/src/corelib/tools/qpoint.h
@@ -64,6 +64,8 @@ public:
Q_DECL_CONSTEXPR inline int manhattanLength() const;
+ Q_DECL_CONSTEXPR QPoint transposed() const noexcept { return {yp, xp}; }
+
Q_DECL_RELAXED_CONSTEXPR inline int &rx();
Q_DECL_RELAXED_CONSTEXPR inline int &ry();
@@ -232,6 +234,8 @@ public:
Q_DECL_RELAXED_CONSTEXPR inline void setX(qreal x);
Q_DECL_RELAXED_CONSTEXPR inline void setY(qreal y);
+ Q_DECL_CONSTEXPR QPointF transposed() const noexcept { return {yp, xp}; }
+
Q_DECL_RELAXED_CONSTEXPR inline qreal &rx();
Q_DECL_RELAXED_CONSTEXPR inline qreal &ry();