diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h
index 1b11bad69f9d235bf443dd74febd4db3036e34f4..814e8ab7bdcf1d77079423afbd204e7589436fda 100644
--- a/src/gui/kernel/qcursor.h
+++ b/src/gui/kernel/qcursor.h
@@ -87,9 +87,12 @@ public:
     QCursor &operator=(const QCursor &cursor);
 #ifdef Q_COMPILER_RVALUE_REFS
     QCursor(QCursor &&other) Q_DECL_NOTHROW : d(other.d) { other.d = Q_NULLPTR; }
-    inline QCursor &operator=(QCursor &&other)
-    { qSwap(d, other.d); return *this; }
+    inline QCursor &operator=(QCursor &&other) Q_DECL_NOTHROW
+    { swap(other); return *this; }
 #endif
+
+    void swap(QCursor &other) Q_DECL_NOTHROW { qSwap(d, other.d); }
+
     operator QVariant() const;
 
     Qt::CursorShape shape() const;
@@ -110,6 +113,7 @@ public:
 private:
     QCursorData *d;
 };
+Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QCursor)
 
 /*****************************************************************************
   QCursor stream functions
diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h
index 8513e6d407d00e19b1daaa8fc88beb4b6ace49c5..882918fc877830443f69dda213153ad707db7e12 100644
--- a/src/gui/painting/qpainterpath.h
+++ b/src/gui/painting/qpainterpath.h
@@ -230,6 +230,7 @@ private:
 #endif
 };
 
+Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QPainterPath)
 Q_DECLARE_TYPEINFO(QPainterPath::Element, Q_PRIMITIVE_TYPE);
 
 #ifndef QT_NO_DATASTREAM
diff --git a/src/gui/painting/qpolygon.h b/src/gui/painting/qpolygon.h
index 7b77ee50144a3583483bb9bf5468c023dd6b207b..23bdd1933f3d0b5931586111f7cd1fb0dba57ee7 100644
--- a/src/gui/painting/qpolygon.h
+++ b/src/gui/painting/qpolygon.h
@@ -98,6 +98,7 @@ public:
     QPolygon intersected(const QPolygon &r) const Q_REQUIRED_RESULT;
     QPolygon subtracted(const QPolygon &r) const Q_REQUIRED_RESULT;
 };
+Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QPolygon)
 
 inline QPolygon::QPolygon(int asize) : QVector<QPoint>(asize) {}
 
@@ -174,6 +175,7 @@ public:
     QPolygonF intersected(const QPolygonF &r) const Q_REQUIRED_RESULT;
     QPolygonF subtracted(const QPolygonF &r) const Q_REQUIRED_RESULT;
 };
+Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QPolygonF)
 
 inline QPolygonF::QPolygonF(int asize) : QVector<QPointF>(asize) {}