summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/image/qicon.h2
-rw-r--r--src/gui/image/qpixmap.h2
-rw-r--r--src/gui/kernel/qcursor.h6
3 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/image/qicon.h b/src/gui/image/qicon.h
index 395de48410..18c6f6d083 100644
--- a/src/gui/image/qicon.h
+++ b/src/gui/image/qicon.h
@@ -72,6 +72,8 @@ public:
{ swap(other); return *this; }
inline void swap(QIcon &other) noexcept
{ qSwap(d, other.d); }
+ bool operator==(const QIcon &) const = delete;
+ bool operator!=(const QIcon &) const = delete;
operator QVariant() const;
diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h
index 568ed6ecb5..19881bda2c 100644
--- a/src/gui/image/qpixmap.h
+++ b/src/gui/image/qpixmap.h
@@ -77,6 +77,8 @@ public:
{ qSwap(data, other.data); return *this; }
inline void swap(QPixmap &other) noexcept
{ qSwap(data, other.data); }
+ bool operator==(const QPixmap &) const = delete;
+ bool operator!=(const QPixmap &) const = delete;
operator QVariant() const;
diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h
index 21ea13c0d7..c7ebe9366a 100644
--- a/src/gui/kernel/qcursor.h
+++ b/src/gui/kernel/qcursor.h
@@ -83,7 +83,7 @@ public:
QCursor();
QCursor(Qt::CursorShape shape);
QCursor(const QBitmap &bitmap, const QBitmap &mask, int hotX=-1, int hotY=-1);
- QCursor(const QPixmap &pixmap, int hotX=-1, int hotY=-1);
+ explicit QCursor(const QPixmap &pixmap, int hotX=-1, int hotY=-1);
QCursor(const QCursor &cursor);
~QCursor();
QCursor &operator=(const QCursor &cursor);
@@ -117,13 +117,11 @@ public:
private:
friend Q_GUI_EXPORT bool operator==(const QCursor &lhs, const QCursor &rhs) noexcept;
+ friend inline bool operator!=(const QCursor &lhs, const QCursor &rhs) noexcept { return !(lhs == rhs); }
QCursorData *d;
};
Q_DECLARE_SHARED(QCursor)
-Q_GUI_EXPORT bool operator==(const QCursor &lhs, const QCursor &rhs) noexcept;
-inline bool operator!=(const QCursor &lhs, const QCursor &rhs) noexcept { return !(lhs == rhs); }
-
/*****************************************************************************
QCursor stream functions
*****************************************************************************/