diff options
author | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2017-02-21 16:28:21 -0800 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2017-03-21 17:22:41 +0000 |
commit | 6445aa4b064931cda36243aafc1600915fac093e (patch) | |
tree | 1b205a10a883951a76b1861cb032fe83f3eda9a7 /src/gui/kernel/qcursor.h | |
parent | 464c0a5824191a33318a5d09f0fb7a8b9c645eb1 (diff) |
QCursor: Add equality operators
[ChangeLog][QtGui][QCursor] Added equality operators.
Change-Id: Iedeab4673b2a77ad2e51a0d50297b12bba3b9505
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/gui/kernel/qcursor.h')
-rw-r--r-- | src/gui/kernel/qcursor.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h index c7e9188e5b..ccce3d84ef 100644 --- a/src/gui/kernel/qcursor.h +++ b/src/gui/kernel/qcursor.h @@ -112,10 +112,14 @@ public: inline static void setPos(QScreen *screen, const QPoint &p) { setPos(screen, p.x(), p.y()); } private: + friend Q_GUI_EXPORT bool operator==(const QCursor &lhs, const QCursor &rhs) Q_DECL_NOTHROW; QCursorData *d; }; Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QCursor) +Q_GUI_EXPORT bool operator==(const QCursor &lhs, const QCursor &rhs) Q_DECL_NOTHROW; +inline bool operator!=(const QCursor &lhs, const QCursor &rhs) Q_DECL_NOTHROW { return !(lhs == rhs); } + /***************************************************************************** QCursor stream functions *****************************************************************************/ |