aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickrendertarget.h
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-30 15:42:51 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-31 11:47:19 +0100
commit3019b82b1b9813b7d23ebc74a40e437cecd60a60 (patch)
tree06bc1488f1647f3d371a990b913bd3e6bdb9fd08 /src/quick/items/qquickrendertarget.h
parent5be2aee25b08a2b501ca44365c7ca7eb23b1a427 (diff)
Hide QQuickRenderTarget equality operators from ADL
Also replace Q_DECL_NOTHROW with noexcept. Task-number: QTBUG-87973 Change-Id: I1471d65076ece5ab6d5efdf0e50b02751789d32b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/quick/items/qquickrendertarget.h')
-rw-r--r--src/quick/items/qquickrendertarget.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/quick/items/qquickrendertarget.h b/src/quick/items/qquickrendertarget.h
index 95070b0a63..26b301c4ff 100644
--- a/src/quick/items/qquickrendertarget.h
+++ b/src/quick/items/qquickrendertarget.h
@@ -86,12 +86,15 @@ public:
private:
void detach();
+ bool isEqual(const QQuickRenderTarget &other) const noexcept;
QQuickRenderTargetPrivate *d;
friend class QQuickRenderTargetPrivate;
-};
-Q_QUICK_EXPORT bool operator==(const QQuickRenderTarget &a, const QQuickRenderTarget &b) Q_DECL_NOTHROW;
-Q_QUICK_EXPORT bool operator!=(const QQuickRenderTarget &a, const QQuickRenderTarget &b) Q_DECL_NOTHROW;
+ friend bool operator==(const QQuickRenderTarget &lhs, const QQuickRenderTarget &rhs) noexcept
+ { return lhs.isEqual(rhs); }
+ friend bool operator!=(const QQuickRenderTarget &lhs, const QQuickRenderTarget &rhs) noexcept
+ { return !lhs.isEqual(rhs); }
+};
QT_END_NAMESPACE