From e2093219665b02e9ac2a416412a371aeb60c7750 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 16 Oct 2018 15:29:58 +0200 Subject: [PATCH] Use Q_DISABLE_COPY_MOVE for private classes Change-Id: I3cfcfba892ff4a0ab4e31f308620b445162bb17b Reviewed-by: Giuseppe D'Angelo --- src/corelib/io/qabstractfileengine_p.h | 4 ++-- src/corelib/io/qfilesystemiterator_p.h | 2 +- src/corelib/io/qwindowspipereader_p.h | 2 +- src/corelib/io/qwindowspipewriter_p.h | 2 +- src/corelib/kernel/qjni_p.h | 2 +- src/corelib/kernel/qmetaobjectbuilder_p.h | 2 +- src/corelib/kernel/qobject_p.h | 2 +- src/corelib/kernel/qobjectdefs_impl.h | 2 +- src/corelib/kernel/qppsobject_p.h | 2 +- src/corelib/mimetypes/qmimedatabase_p.h | 2 +- src/corelib/mimetypes/qmimetypeparser_p.h | 2 +- src/corelib/serialization/qjson_p.h | 2 +- src/corelib/statemachine/qsignaleventgenerator_p.h | 2 +- src/corelib/tools/qcollator_p.h | 4 ++-- src/corelib/tools/qfreelist_p.h | 2 +- src/dbus/qdbusargument_p.h | 4 ++-- src/dbus/qdbusconnection_p.h | 2 +- src/gui/image/qpaintengine_pic_p.h | 2 +- src/gui/image/qpixmap_win.cpp | 2 +- src/gui/kernel/qdnd_p.h | 2 +- src/gui/kernel/qkeymapper_p.h | 2 +- src/gui/kernel/qopenglcontext_p.h | 2 +- src/gui/kernel/qwindowsysteminterface_p.h | 2 +- src/gui/opengl/qopenglcustomshaderstage_p.h | 2 +- src/gui/opengl/qopenglpaintengine_p.h | 2 +- src/gui/painting/qdatabuffer_p.h | 2 +- src/gui/painting/qpainterpath_p.h | 2 +- src/gui/painting/qpathclipper_p.h | 2 +- src/gui/painting/qvectorpath_p.h | 2 +- src/gui/text/qfont_p.h | 2 +- src/gui/text/qtextdocumentfragment_p.h | 2 +- src/gui/text/qtextformat_p.h | 2 +- src/gui/text/qzipreader_p.h | 2 +- src/gui/text/qzipwriter_p.h | 2 +- src/network/access/http2/bitstreams_p.h | 2 +- src/network/access/http2/hpacktable_p.h | 2 +- src/network/access/qftp_p.h | 2 +- src/network/access/qhstsstore_p.h | 2 +- src/network/access/qhttpnetworkconnection_p.h | 2 +- src/network/bearer/qnetworkconfiguration_p.h | 2 +- src/network/kernel/qnetworkproxy_win.cpp | 4 ++-- src/network/socket/qabstractsocketengine_p.h | 2 +- src/network/socket/qhttpsocketengine_p.h | 2 +- src/network/socket/qnativesocketengine_p.h | 2 +- src/network/socket/qnativesocketengine_winrt_p.h | 2 +- src/network/socket/qsocks5socketengine_p.h | 2 +- src/network/ssl/qsslkey_p.h | 2 +- src/network/ssl/qsslsocket_mac.cpp | 2 +- src/network/ssl/qsslsocket_mac_p.h | 4 ++-- src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | 2 +- src/opengl/qgraphicsshadereffect_p.h | 2 +- src/platformsupport/devicediscovery/qdevicediscovery_p.h | 2 +- .../fontdatabases/windows/qwindowsfontdatabase_p.h | 4 ++-- .../fontdatabases/windows/qwindowsfontengine_p.h | 2 +- .../windows/qwindowsfontenginedirectwrite.cpp | 2 +- .../windows/qwindowsfontenginedirectwrite_p.h | 2 +- .../fontdatabases/windows/qwindowsnativeimage_p.h | 2 +- .../input/evdevkeyboard/qevdevkeyboardhandler_p.h | 2 +- .../platforms/xcb/nativepainting/qpaintengine_x11_p.h | 2 +- src/plugins/platforms/xcb/qxcbsessionmanager.h | 2 -- .../xdgdesktopportal/qxdgdesktopportaltheme.h | 2 +- src/plugins/printsupport/cups/qcupsprintengine_p.h | 4 ++-- src/plugins/printsupport/windows/qwindowsprintersupport.h | 2 +- src/plugins/styles/android/qandroidstyle_p.h | 2 +- src/plugins/styles/mac/qmacstyle_mac_p.h | 2 +- src/plugins/styles/windowsvista/qwindowsvistastyle_p.h | 2 +- src/plugins/styles/windowsvista/qwindowsxpstyle_p.h | 2 +- src/printsupport/widgets/qcupsjobwidget_p.h | 2 +- src/testlib/qtestcase.cpp | 7 ++++--- src/tools/uic/driver.h | 2 +- src/tools/uic/uic.h | 2 +- src/widgets/dialogs/qfiledialog_p.h | 2 +- src/widgets/dialogs/qwizard_win_p.h | 2 +- src/widgets/effects/qgraphicseffect_p.h | 2 +- src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h | 2 +- src/widgets/graphicsview/qgraphicssceneindex_p.h | 2 +- src/widgets/graphicsview/qsimplex_p.h | 2 +- src/widgets/itemviews/qcolumnviewgrip_p.h | 2 +- src/widgets/kernel/qwidget_p.h | 2 +- src/widgets/kernel/qwidgetbackingstore_p.h | 2 +- src/widgets/statemachine/qbasickeyeventtransition_p.h | 2 +- src/widgets/statemachine/qbasicmouseeventtransition_p.h | 2 +- src/widgets/styles/qdrawutil.cpp | 2 +- src/widgets/styles/qstylesheetstyle_p.h | 2 +- src/widgets/styles/qwindowsstyle_p.h | 2 +- src/widgets/widgets/qmenu_p.h | 2 +- src/widgets/widgets/qwidgetresizehandler_p.h | 2 +- src/widgets/widgets/qwidgettextcontrol_p.h | 2 +- 88 files changed, 97 insertions(+), 98 deletions(-) diff --git a/src/corelib/io/qabstractfileengine_p.h b/src/corelib/io/qabstractfileengine_p.h index 00c415b521..4a7fe7bff5 100644 --- a/src/corelib/io/qabstractfileengine_p.h +++ b/src/corelib/io/qabstractfileengine_p.h @@ -208,7 +208,7 @@ protected: QScopedPointer d_ptr; private: Q_DECLARE_PRIVATE(QAbstractFileEngine) - Q_DISABLE_COPY(QAbstractFileEngine) + Q_DISABLE_COPY_MOVE(QAbstractFileEngine) }; Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractFileEngine::FileFlags) @@ -245,7 +245,7 @@ protected: virtual QVariant entryInfo(EntryInfoType type) const; private: - Q_DISABLE_COPY(QAbstractFileEngineIterator) + Q_DISABLE_COPY_MOVE(QAbstractFileEngineIterator) friend class QDirIterator; friend class QDirIteratorPrivate; void setPath(const QString &path); diff --git a/src/corelib/io/qfilesystemiterator_p.h b/src/corelib/io/qfilesystemiterator_p.h index 081487e66e..5e4e424e69 100644 --- a/src/corelib/io/qfilesystemiterator_p.h +++ b/src/corelib/io/qfilesystemiterator_p.h @@ -96,7 +96,7 @@ private: int lastError; #endif - Q_DISABLE_COPY(QFileSystemIterator) + Q_DISABLE_COPY_MOVE(QFileSystemIterator) }; QT_END_NAMESPACE diff --git a/src/corelib/io/qwindowspipereader_p.h b/src/corelib/io/qwindowspipereader_p.h index e52aa4c33d..c757753c9c 100644 --- a/src/corelib/io/qwindowspipereader_p.h +++ b/src/corelib/io/qwindowspipereader_p.h @@ -97,7 +97,7 @@ private: class Overlapped : public OVERLAPPED { - Q_DISABLE_COPY(Overlapped) + Q_DISABLE_COPY_MOVE(Overlapped) public: explicit Overlapped(QWindowsPipeReader *reader); void clear(); diff --git a/src/corelib/io/qwindowspipewriter_p.h b/src/corelib/io/qwindowspipewriter_p.h index d6671c3f27..6c269e86b7 100644 --- a/src/corelib/io/qwindowspipewriter_p.h +++ b/src/corelib/io/qwindowspipewriter_p.h @@ -134,7 +134,7 @@ private: class Overlapped : public OVERLAPPED { - Q_DISABLE_COPY(Overlapped) + Q_DISABLE_COPY_MOVE(Overlapped) public: explicit Overlapped(QWindowsPipeWriter *pipeWriter); void clear(); diff --git a/src/corelib/kernel/qjni_p.h b/src/corelib/kernel/qjni_p.h index 52abd51dc1..ec8525e6e1 100644 --- a/src/corelib/kernel/qjni_p.h +++ b/src/corelib/kernel/qjni_p.h @@ -76,7 +76,7 @@ public: private: friend class QAndroidJniEnvironment; - Q_DISABLE_COPY(QJNIEnvironmentPrivate) + Q_DISABLE_COPY_MOVE(QJNIEnvironmentPrivate) JNIEnv *jniEnv; }; diff --git a/src/corelib/kernel/qmetaobjectbuilder_p.h b/src/corelib/kernel/qmetaobjectbuilder_p.h index 115ec835aa..6100835bad 100644 --- a/src/corelib/kernel/qmetaobjectbuilder_p.h +++ b/src/corelib/kernel/qmetaobjectbuilder_p.h @@ -184,7 +184,7 @@ public: #endif private: - Q_DISABLE_COPY(QMetaObjectBuilder) + Q_DISABLE_COPY_MOVE(QMetaObjectBuilder) QMetaObjectBuilderPrivate *d; diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h index 9c6724d8ab..a762e6f529 100644 --- a/src/corelib/kernel/qobject_p.h +++ b/src/corelib/kernel/qobject_p.h @@ -407,7 +407,7 @@ private: class QBoolBlocker { - Q_DISABLE_COPY(QBoolBlocker) + Q_DISABLE_COPY_MOVE(QBoolBlocker) public: explicit inline QBoolBlocker(bool &b, bool value=true):block(b), reset(b){block = value;} inline ~QBoolBlocker(){block = reset; } diff --git a/src/corelib/kernel/qobjectdefs_impl.h b/src/corelib/kernel/qobjectdefs_impl.h index 8afff1fb98..aa6bd84e95 100644 --- a/src/corelib/kernel/qobjectdefs_impl.h +++ b/src/corelib/kernel/qobjectdefs_impl.h @@ -395,7 +395,7 @@ namespace QtPrivate { protected: ~QSlotObjectBase() {} private: - Q_DISABLE_COPY(QSlotObjectBase) + Q_DISABLE_COPY_MOVE(QSlotObjectBase) }; // implementation of QSlotObjectBase for which the slot is a pointer to member function of a QObject diff --git a/src/corelib/kernel/qppsobject_p.h b/src/corelib/kernel/qppsobject_p.h index c7b99c8e42..a4649918fc 100644 --- a/src/corelib/kernel/qppsobject_p.h +++ b/src/corelib/kernel/qppsobject_p.h @@ -119,7 +119,7 @@ Q_SIGNALS: private: Q_DECLARE_PRIVATE(QPpsObject) - Q_DISABLE_COPY(QPpsObject) + Q_DISABLE_COPY_MOVE(QPpsObject) }; QT_END_NAMESPACE diff --git a/src/corelib/mimetypes/qmimedatabase_p.h b/src/corelib/mimetypes/qmimedatabase_p.h index 7bc1d41c4d..d9cf446d44 100644 --- a/src/corelib/mimetypes/qmimedatabase_p.h +++ b/src/corelib/mimetypes/qmimedatabase_p.h @@ -74,7 +74,7 @@ class QMimeProviderBase; class QMimeDatabasePrivate { public: - Q_DISABLE_COPY(QMimeDatabasePrivate) + Q_DISABLE_COPY_MOVE(QMimeDatabasePrivate) QMimeDatabasePrivate(); ~QMimeDatabasePrivate(); diff --git a/src/corelib/mimetypes/qmimetypeparser_p.h b/src/corelib/mimetypes/qmimetypeparser_p.h index 6e3f5fd556..d6a1444592 100644 --- a/src/corelib/mimetypes/qmimetypeparser_p.h +++ b/src/corelib/mimetypes/qmimetypeparser_p.h @@ -64,7 +64,7 @@ class QIODevice; class QMimeTypeParserBase { - Q_DISABLE_COPY(QMimeTypeParserBase) + Q_DISABLE_COPY_MOVE(QMimeTypeParserBase) public: QMimeTypeParserBase() {} diff --git a/src/corelib/serialization/qjson_p.h b/src/corelib/serialization/qjson_p.h index feba1faac6..40b2414e4a 100644 --- a/src/corelib/serialization/qjson_p.h +++ b/src/corelib/serialization/qjson_p.h @@ -746,7 +746,7 @@ public: bool valid() const; private: - Q_DISABLE_COPY(Data) + Q_DISABLE_COPY_MOVE(Data) }; } diff --git a/src/corelib/statemachine/qsignaleventgenerator_p.h b/src/corelib/statemachine/qsignaleventgenerator_p.h index 271f6317bd..72592b8731 100644 --- a/src/corelib/statemachine/qsignaleventgenerator_p.h +++ b/src/corelib/statemachine/qsignaleventgenerator_p.h @@ -71,7 +71,7 @@ private: void execute(void **_a); private: - Q_DISABLE_COPY(QSignalEventGenerator) + Q_DISABLE_COPY_MOVE(QSignalEventGenerator) }; QT_END_NAMESPACE diff --git a/src/corelib/tools/qcollator_p.h b/src/corelib/tools/qcollator_p.h index e89c08447c..321e846884 100644 --- a/src/corelib/tools/qcollator_p.h +++ b/src/corelib/tools/qcollator_p.h @@ -121,7 +121,7 @@ public: void cleanup(); private: - Q_DISABLE_COPY(QCollatorPrivate) + Q_DISABLE_COPY_MOVE(QCollatorPrivate) }; class QCollatorSortKeyPrivate : public QSharedData @@ -138,7 +138,7 @@ public: CollatorKeyType m_key; private: - Q_DISABLE_COPY(QCollatorSortKeyPrivate) + Q_DISABLE_COPY_MOVE(QCollatorSortKeyPrivate) }; diff --git a/src/corelib/tools/qfreelist_p.h b/src/corelib/tools/qfreelist_p.h index 2f98cf5cc1..63be0952ff 100644 --- a/src/corelib/tools/qfreelist_p.h +++ b/src/corelib/tools/qfreelist_p.h @@ -187,7 +187,7 @@ class QFreeList QAtomicInt _next; // QFreeList is not copyable - Q_DISABLE_COPY(QFreeList) + Q_DISABLE_COPY_MOVE(QFreeList) public: Q_DECL_CONSTEXPR inline QFreeList(); diff --git a/src/dbus/qdbusargument_p.h b/src/dbus/qdbusargument_p.h index 559f8b1186..b678b9606f 100644 --- a/src/dbus/qdbusargument_p.h +++ b/src/dbus/qdbusargument_p.h @@ -155,7 +155,7 @@ public: bool skipSignature; private: - Q_DISABLE_COPY(QDBusMarshaller) + Q_DISABLE_COPY_MOVE(QDBusMarshaller) }; class QDBusDemarshaller: public QDBusArgumentPrivate @@ -208,7 +208,7 @@ public: QDBusDemarshaller *parent; private: - Q_DISABLE_COPY(QDBusDemarshaller) + Q_DISABLE_COPY_MOVE(QDBusDemarshaller) QString toStringUnchecked(); QDBusObjectPath toObjectPathUnchecked(); QDBusSignature toSignatureUnchecked(); diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h index 84ce21092a..7769b9ea71 100644 --- a/src/dbus/qdbusconnection_p.h +++ b/src/dbus/qdbusconnection_p.h @@ -94,7 +94,7 @@ class QDBusServer; class QDBusErrorInternal { mutable DBusError error; - Q_DISABLE_COPY(QDBusErrorInternal) + Q_DISABLE_COPY_MOVE(QDBusErrorInternal) public: inline QDBusErrorInternal() { q_dbus_error_init(&error); } inline ~QDBusErrorInternal() { q_dbus_error_free(&error); } diff --git a/src/gui/image/qpaintengine_pic_p.h b/src/gui/image/qpaintengine_pic_p.h index c3044796ad..c9e4b43197 100644 --- a/src/gui/image/qpaintengine_pic_p.h +++ b/src/gui/image/qpaintengine_pic_p.h @@ -103,7 +103,7 @@ protected: QPicturePaintEngine(QPaintEnginePrivate &dptr); private: - Q_DISABLE_COPY(QPicturePaintEngine) + Q_DISABLE_COPY_MOVE(QPicturePaintEngine) void writeCmdLength(int pos, const QRectF &r, bool corr); }; diff --git a/src/gui/image/qpixmap_win.cpp b/src/gui/image/qpixmap_win.cpp index b8d13ac092..68d204d76e 100644 --- a/src/gui/image/qpixmap_win.cpp +++ b/src/gui/image/qpixmap_win.cpp @@ -210,7 +210,7 @@ static QImage copyImageData(const BITMAPINFOHEADER &header, const RGBQUAD *color class DisplayHdc { - Q_DISABLE_COPY(DisplayHdc) + Q_DISABLE_COPY_MOVE(DisplayHdc) public: DisplayHdc() : m_displayDc(GetDC(nullptr)) {} ~DisplayHdc() { ReleaseDC(nullptr, m_displayDc); } diff --git a/src/gui/kernel/qdnd_p.h b/src/gui/kernel/qdnd_p.h index 5f6db07987..8f8eb03f87 100644 --- a/src/gui/kernel/qdnd_p.h +++ b/src/gui/kernel/qdnd_p.h @@ -110,7 +110,7 @@ private: QDrag *m_object; static QDragManager *m_instance; - Q_DISABLE_COPY(QDragManager) + Q_DISABLE_COPY_MOVE(QDragManager) }; QT_END_NAMESPACE diff --git a/src/gui/kernel/qkeymapper_p.h b/src/gui/kernel/qkeymapper_p.h index aeec7b7414..8364557020 100644 --- a/src/gui/kernel/qkeymapper_p.h +++ b/src/gui/kernel/qkeymapper_p.h @@ -76,7 +76,7 @@ public: private: friend QKeyMapperPrivate *qt_keymapper_private(); Q_DECLARE_PRIVATE(QKeyMapper) - Q_DISABLE_COPY(QKeyMapper) + Q_DISABLE_COPY_MOVE(QKeyMapper) }; struct KeyboardLayoutItem; diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h index 1cb7390687..2849d0c58e 100644 --- a/src/gui/kernel/qopenglcontext_p.h +++ b/src/gui/kernel/qopenglcontext_p.h @@ -97,7 +97,7 @@ private: friend class QOpenGLContextGroupPrivate; friend class QOpenGLMultiGroupSharedResource; - Q_DISABLE_COPY(QOpenGLSharedResource) + Q_DISABLE_COPY_MOVE(QOpenGLSharedResource) }; class Q_GUI_EXPORT QOpenGLSharedResourceGuard : public QOpenGLSharedResource diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h index 9cb4e191cc..563ca8f922 100644 --- a/src/gui/kernel/qwindowsysteminterface_p.h +++ b/src/gui/kernel/qwindowsysteminterface_p.h @@ -508,7 +508,7 @@ public: } } private: - Q_DISABLE_COPY(WindowSystemEventList) + Q_DISABLE_COPY_MOVE(WindowSystemEventList) }; static WindowSystemEventList windowSystemEventQueue; diff --git a/src/gui/opengl/qopenglcustomshaderstage_p.h b/src/gui/opengl/qopenglcustomshaderstage_p.h index f4a71af88e..ce3e9efd23 100644 --- a/src/gui/opengl/qopenglcustomshaderstage_p.h +++ b/src/gui/opengl/qopenglcustomshaderstage_p.h @@ -80,7 +80,7 @@ protected: private: QOpenGLCustomShaderStagePrivate* d_ptr; - Q_DISABLE_COPY(QOpenGLCustomShaderStage) + Q_DISABLE_COPY_MOVE(QOpenGLCustomShaderStage) }; diff --git a/src/gui/opengl/qopenglpaintengine_p.h b/src/gui/opengl/qopenglpaintengine_p.h index 0541ce6168..15ac240b89 100644 --- a/src/gui/opengl/qopenglpaintengine_p.h +++ b/src/gui/opengl/qopenglpaintengine_p.h @@ -166,7 +166,7 @@ public: bool shouldDrawCachedGlyphs(QFontEngine *, const QTransform &) const override; private: - Q_DISABLE_COPY(QOpenGL2PaintEngineEx) + Q_DISABLE_COPY_MOVE(QOpenGL2PaintEngineEx) friend class QOpenGLEngineShaderManager; }; diff --git a/src/gui/painting/qdatabuffer_p.h b/src/gui/painting/qdatabuffer_p.h index 7cac2ac358..28d5f6d6c5 100644 --- a/src/gui/painting/qdatabuffer_p.h +++ b/src/gui/painting/qdatabuffer_p.h @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE template class QDataBuffer { - Q_DISABLE_COPY(QDataBuffer) + Q_DISABLE_COPY_MOVE(QDataBuffer) public: QDataBuffer(int res) { diff --git a/src/gui/painting/qpainterpath_p.h b/src/gui/painting/qpainterpath_p.h index 92d9a4ea66..aab318bcab 100644 --- a/src/gui/painting/qpainterpath_p.h +++ b/src/gui/painting/qpainterpath_p.h @@ -157,7 +157,7 @@ public: QVectorPath path; private: - Q_DISABLE_COPY(QVectorPathConverter) + Q_DISABLE_COPY_MOVE(QVectorPathConverter) }; class QPainterPathData : public QPainterPathPrivate diff --git a/src/gui/painting/qpathclipper_p.h b/src/gui/painting/qpathclipper_p.h index 64e684e1ad..c25a479807 100644 --- a/src/gui/painting/qpathclipper_p.h +++ b/src/gui/painting/qpathclipper_p.h @@ -86,7 +86,7 @@ public: static QPainterPath intersect(const QPainterPath &path, const QRectF &rect); private: - Q_DISABLE_COPY(QPathClipper) + Q_DISABLE_COPY_MOVE(QPathClipper) enum ClipperMode { ClipMode, // do the full clip diff --git a/src/gui/painting/qvectorpath_p.h b/src/gui/painting/qvectorpath_p.h index 8580598784..1b649a5d2a 100644 --- a/src/gui/painting/qvectorpath_p.h +++ b/src/gui/painting/qvectorpath_p.h @@ -196,7 +196,7 @@ public: private: - Q_DISABLE_COPY(QVectorPath) + Q_DISABLE_COPY_MOVE(QVectorPath) const QPainterPath::ElementType *m_elements; const qreal *m_points; diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h index f8835dd513..e86ec31e47 100644 --- a/src/gui/text/qfont_p.h +++ b/src/gui/text/qfont_p.h @@ -165,7 +165,7 @@ public: QFontEngine *engines[QChar::ScriptCount]; private: - Q_DISABLE_COPY(QFontEngineData) + Q_DISABLE_COPY_MOVE(QFontEngineData) }; diff --git a/src/gui/text/qtextdocumentfragment_p.h b/src/gui/text/qtextdocumentfragment_p.h index 02a6a429fa..de01a02fbb 100644 --- a/src/gui/text/qtextdocumentfragment_p.h +++ b/src/gui/text/qtextdocumentfragment_p.h @@ -109,7 +109,7 @@ public: uint importedFromPlainText : 1; private: - Q_DISABLE_COPY(QTextDocumentFragmentPrivate) + Q_DISABLE_COPY_MOVE(QTextDocumentFragmentPrivate) }; #ifndef QT_NO_TEXTHTMLPARSER diff --git a/src/gui/text/qtextformat_p.h b/src/gui/text/qtextformat_p.h index 3557c17a97..001a243e84 100644 --- a/src/gui/text/qtextformat_p.h +++ b/src/gui/text/qtextformat_p.h @@ -104,7 +104,7 @@ public: private: QFont defaultFnt; - Q_DISABLE_COPY(QTextFormatCollection) + Q_DISABLE_COPY_MOVE(QTextFormatCollection) }; QT_END_NAMESPACE diff --git a/src/gui/text/qzipreader_p.h b/src/gui/text/qzipreader_p.h index eed6ee6a62..378072b366 100644 --- a/src/gui/text/qzipreader_p.h +++ b/src/gui/text/qzipreader_p.h @@ -116,7 +116,7 @@ public: private: QZipReaderPrivate *d; - Q_DISABLE_COPY(QZipReader) + Q_DISABLE_COPY_MOVE(QZipReader) }; Q_DECLARE_TYPEINFO(QZipReader::FileInfo, Q_MOVABLE_TYPE); Q_DECLARE_TYPEINFO(QZipReader::Status, Q_PRIMITIVE_TYPE); diff --git a/src/gui/text/qzipwriter_p.h b/src/gui/text/qzipwriter_p.h index 433bbab31e..b3bb5929cf 100644 --- a/src/gui/text/qzipwriter_p.h +++ b/src/gui/text/qzipwriter_p.h @@ -108,7 +108,7 @@ public: void close(); private: QZipWriterPrivate *d; - Q_DISABLE_COPY(QZipWriter) + Q_DISABLE_COPY_MOVE(QZipWriter) }; QT_END_NAMESPACE diff --git a/src/network/access/http2/bitstreams_p.h b/src/network/access/http2/bitstreams_p.h index 9eba319dc2..ca272062a6 100644 --- a/src/network/access/http2/bitstreams_p.h +++ b/src/network/access/http2/bitstreams_p.h @@ -89,7 +89,7 @@ public: void clear(); private: - Q_DISABLE_COPY(BitOStream); + Q_DISABLE_COPY_MOVE(BitOStream); std::vector &buffer; quint64 bitsSet; diff --git a/src/network/access/http2/hpacktable_p.h b/src/network/access/http2/hpacktable_p.h index aaea89b986..5eaccbffce 100644 --- a/src/network/access/http2/hpacktable_p.h +++ b/src/network/access/http2/hpacktable_p.h @@ -227,7 +227,7 @@ private: mutable QByteArray dummyDst; - Q_DISABLE_COPY(FieldLookupTable); + Q_DISABLE_COPY_MOVE(FieldLookupTable); }; } diff --git a/src/network/access/qftp_p.h b/src/network/access/qftp_p.h index bba1f9b09d..0516c3d1f9 100644 --- a/src/network/access/qftp_p.h +++ b/src/network/access/qftp_p.h @@ -158,7 +158,7 @@ Q_SIGNALS: void done(bool); private: - Q_DISABLE_COPY(QFtp) + Q_DISABLE_COPY_MOVE(QFtp) Q_DECLARE_PRIVATE(QFtp) Q_PRIVATE_SLOT(d_func(), void _q_startNextCommand()) diff --git a/src/network/access/qhstsstore_p.h b/src/network/access/qhstsstore_p.h index e82596b250..5338d15592 100644 --- a/src/network/access/qhstsstore_p.h +++ b/src/network/access/qhstsstore_p.h @@ -87,7 +87,7 @@ private: QVector observedPolicies; QSettings store; - Q_DISABLE_COPY(QHstsStore) + Q_DISABLE_COPY_MOVE(QHstsStore) }; QT_END_NAMESPACE diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h index 91827a6eb1..da54fbac2c 100644 --- a/src/network/access/qhttpnetworkconnection_p.h +++ b/src/network/access/qhttpnetworkconnection_p.h @@ -156,7 +156,7 @@ public: private: Q_DECLARE_PRIVATE(QHttpNetworkConnection) - Q_DISABLE_COPY(QHttpNetworkConnection) + Q_DISABLE_COPY_MOVE(QHttpNetworkConnection) friend class QHttpThreadDelegate; friend class QHttpNetworkReply; friend class QHttpNetworkReplyPrivate; diff --git a/src/network/bearer/qnetworkconfiguration_p.h b/src/network/bearer/qnetworkconfiguration_p.h index 2fdb490ea0..1b1ece39b7 100644 --- a/src/network/bearer/qnetworkconfiguration_p.h +++ b/src/network/bearer/qnetworkconfiguration_p.h @@ -97,7 +97,7 @@ public: static Q_CONSTEXPR int DefaultTimeout = 30000; private: - Q_DISABLE_COPY(QNetworkConfigurationPrivate) + Q_DISABLE_COPY_MOVE(QNetworkConfigurationPrivate) }; QT_END_NAMESPACE diff --git a/src/network/kernel/qnetworkproxy_win.cpp b/src/network/kernel/qnetworkproxy_win.cpp index db51732bd3..56397814b0 100644 --- a/src/network/kernel/qnetworkproxy_win.cpp +++ b/src/network/kernel/qnetworkproxy_win.cpp @@ -370,7 +370,7 @@ static QList parseServerList(const QNetworkProxyQuery &query, con #if !defined(Q_OS_WINRT) namespace { class QRegistryWatcher { - Q_DISABLE_COPY(QRegistryWatcher) + Q_DISABLE_COPY_MOVE(QRegistryWatcher) public: QRegistryWatcher() = default; @@ -425,7 +425,7 @@ private: class QWindowsSystemProxy { - Q_DISABLE_COPY(QWindowsSystemProxy) + Q_DISABLE_COPY_MOVE(QWindowsSystemProxy) public: QWindowsSystemProxy(); ~QWindowsSystemProxy(); diff --git a/src/network/socket/qabstractsocketengine_p.h b/src/network/socket/qabstractsocketengine_p.h index b15dd73c96..8eebb06a4d 100644 --- a/src/network/socket/qabstractsocketengine_p.h +++ b/src/network/socket/qabstractsocketengine_p.h @@ -215,7 +215,7 @@ protected: private: Q_DECLARE_PRIVATE(QAbstractSocketEngine) - Q_DISABLE_COPY(QAbstractSocketEngine) + Q_DISABLE_COPY_MOVE(QAbstractSocketEngine) }; class QAbstractSocketEnginePrivate : public QObjectPrivate diff --git a/src/network/socket/qhttpsocketengine_p.h b/src/network/socket/qhttpsocketengine_p.h index cb7798694a..bbcc09eee9 100644 --- a/src/network/socket/qhttpsocketengine_p.h +++ b/src/network/socket/qhttpsocketengine_p.h @@ -160,7 +160,7 @@ private: bool readHttpHeader(); Q_DECLARE_PRIVATE(QHttpSocketEngine) - Q_DISABLE_COPY(QHttpSocketEngine) + Q_DISABLE_COPY_MOVE(QHttpSocketEngine) }; diff --git a/src/network/socket/qnativesocketengine_p.h b/src/network/socket/qnativesocketengine_p.h index aa61b74823..2292566265 100644 --- a/src/network/socket/qnativesocketengine_p.h +++ b/src/network/socket/qnativesocketengine_p.h @@ -196,7 +196,7 @@ public Q_SLOTS: private: Q_DECLARE_PRIVATE(QNativeSocketEngine) - Q_DISABLE_COPY(QNativeSocketEngine) + Q_DISABLE_COPY_MOVE(QNativeSocketEngine) }; class QSocketNotifier; diff --git a/src/network/socket/qnativesocketengine_winrt_p.h b/src/network/socket/qnativesocketengine_winrt_p.h index 6688bfe35c..e1fe58bb97 100644 --- a/src/network/socket/qnativesocketengine_winrt_p.h +++ b/src/network/socket/qnativesocketengine_winrt_p.h @@ -188,7 +188,7 @@ private slots: private: Q_DECLARE_PRIVATE(QNativeSocketEngine) - Q_DISABLE_COPY(QNativeSocketEngine) + Q_DISABLE_COPY_MOVE(QNativeSocketEngine) }; class QNativeSocketEnginePrivate : public QAbstractSocketEnginePrivate diff --git a/src/network/socket/qsocks5socketengine_p.h b/src/network/socket/qsocks5socketengine_p.h index 1942eff4ca..ef9d771753 100644 --- a/src/network/socket/qsocks5socketengine_p.h +++ b/src/network/socket/qsocks5socketengine_p.h @@ -127,7 +127,7 @@ public: private: Q_DECLARE_PRIVATE(QSocks5SocketEngine) - Q_DISABLE_COPY(QSocks5SocketEngine) + Q_DISABLE_COPY_MOVE(QSocks5SocketEngine) Q_PRIVATE_SLOT(d_func(), void _q_controlSocketConnected()) Q_PRIVATE_SLOT(d_func(), void _q_controlSocketReadNotification()) Q_PRIVATE_SLOT(d_func(), void _q_controlSocketError(QAbstractSocket::SocketError)) diff --git a/src/network/ssl/qsslkey_p.h b/src/network/ssl/qsslkey_p.h index 310553cab2..06403b5479 100644 --- a/src/network/ssl/qsslkey_p.h +++ b/src/network/ssl/qsslkey_p.h @@ -130,7 +130,7 @@ public: QAtomicInt ref; private: - Q_DISABLE_COPY(QSslKeyPrivate) + Q_DISABLE_COPY_MOVE(QSslKeyPrivate) }; QT_END_NAMESPACE diff --git a/src/network/ssl/qsslsocket_mac.cpp b/src/network/ssl/qsslsocket_mac.cpp index 66623cebef..f92eaf872b 100644 --- a/src/network/ssl/qsslsocket_mac.cpp +++ b/src/network/ssl/qsslsocket_mac.cpp @@ -89,7 +89,7 @@ struct EphemeralSecKeychain ~EphemeralSecKeychain(); SecKeychainRef keychain = nullptr; - Q_DISABLE_COPY(EphemeralSecKeychain) + Q_DISABLE_COPY_MOVE(EphemeralSecKeychain) }; EphemeralSecKeychain::EphemeralSecKeychain() diff --git a/src/network/ssl/qsslsocket_mac_p.h b/src/network/ssl/qsslsocket_mac_p.h index e37171e56a..48aca964a1 100644 --- a/src/network/ssl/qsslsocket_mac_p.h +++ b/src/network/ssl/qsslsocket_mac_p.h @@ -75,7 +75,7 @@ public: private: SSLContextRef context; - Q_DISABLE_COPY(QSecureTransportContext) + Q_DISABLE_COPY_MOVE(QSecureTransportContext) }; class QSslSocketBackendPrivate : public QSslSocketPrivate @@ -129,7 +129,7 @@ private: QSecureTransportContext context; bool renegotiating = false; - Q_DISABLE_COPY(QSslSocketBackendPrivate) + Q_DISABLE_COPY_MOVE(QSslSocketBackendPrivate) }; QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index d1ed621790..abf5b8ea48 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -160,7 +160,7 @@ public: void setTranslateZ(GLfloat z); private: - Q_DISABLE_COPY(QGL2PaintEngineEx) + Q_DISABLE_COPY_MOVE(QGL2PaintEngineEx) }; class QGL2PaintEngineExPrivate : public QPaintEngineExPrivate, protected QOpenGLExtensions diff --git a/src/opengl/qgraphicsshadereffect_p.h b/src/opengl/qgraphicsshadereffect_p.h index 9efcecd25f..1a32f24d70 100644 --- a/src/opengl/qgraphicsshadereffect_p.h +++ b/src/opengl/qgraphicsshadereffect_p.h @@ -80,7 +80,7 @@ protected: private: Q_DECLARE_PRIVATE(QGraphicsShaderEffect) - Q_DISABLE_COPY(QGraphicsShaderEffect) + Q_DISABLE_COPY_MOVE(QGraphicsShaderEffect) friend class QGLCustomShaderEffectStage; }; diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_p.h b/src/platformsupport/devicediscovery/qdevicediscovery_p.h index e3c22b0b37..b1ce14b5c3 100644 --- a/src/platformsupport/devicediscovery/qdevicediscovery_p.h +++ b/src/platformsupport/devicediscovery/qdevicediscovery_p.h @@ -96,7 +96,7 @@ signals: protected: QDeviceDiscovery(QDeviceTypes types, QObject *parent) : QObject(parent), m_types(types) { } - Q_DISABLE_COPY(QDeviceDiscovery) + Q_DISABLE_COPY_MOVE(QDeviceDiscovery) QDeviceTypes m_types; }; diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h index 9d0aa7f723..4558496e63 100644 --- a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h +++ b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h @@ -67,7 +67,7 @@ Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) class QWindowsFontEngineData { - Q_DISABLE_COPY(QWindowsFontEngineData) + Q_DISABLE_COPY_MOVE(QWindowsFontEngineData) public: QWindowsFontEngineData(); ~QWindowsFontEngineData(); @@ -85,7 +85,7 @@ public: class QWindowsFontDatabase : public QPlatformFontDatabase { - Q_DISABLE_COPY(QWindowsFontDatabase) + Q_DISABLE_COPY_MOVE(QWindowsFontDatabase) public: enum FontOptions { // Relevant bits from QWindowsIntegration::Options diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h b/src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h index a151cf7343..19d8b98e8a 100644 --- a/src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h +++ b/src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h @@ -66,7 +66,7 @@ class QWindowsFontEngineData; class QWindowsFontEngine : public QFontEngine { - Q_DISABLE_COPY(QWindowsFontEngine) + Q_DISABLE_COPY_MOVE(QWindowsFontEngine) friend class QWindowsMultiFontEngine; public: diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp index 57c41938bc..60a5896e7b 100644 --- a/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp +++ b/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp @@ -69,7 +69,7 @@ namespace { class GeometrySink: public IDWriteGeometrySink { - Q_DISABLE_COPY(GeometrySink) + Q_DISABLE_COPY_MOVE(GeometrySink) public: GeometrySink(QPainterPath *path) : m_refCount(0), m_path(path) diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite_p.h b/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite_p.h index 9326f5aece..3eaf8cf3d8 100644 --- a/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite_p.h +++ b/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite_p.h @@ -72,7 +72,7 @@ class QWindowsFontEngineData; class QWindowsFontEngineDirectWrite : public QFontEngine { - Q_DISABLE_COPY(QWindowsFontEngineDirectWrite) + Q_DISABLE_COPY_MOVE(QWindowsFontEngineDirectWrite) public: explicit QWindowsFontEngineDirectWrite(IDWriteFontFace *directWriteFontFace, qreal pixelSize, diff --git a/src/platformsupport/fontdatabases/windows/qwindowsnativeimage_p.h b/src/platformsupport/fontdatabases/windows/qwindowsnativeimage_p.h index 6c47a527d2..ed68ac2644 100644 --- a/src/platformsupport/fontdatabases/windows/qwindowsnativeimage_p.h +++ b/src/platformsupport/fontdatabases/windows/qwindowsnativeimage_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE class QWindowsNativeImage { - Q_DISABLE_COPY(QWindowsNativeImage) + Q_DISABLE_COPY_MOVE(QWindowsNativeImage) public: QWindowsNativeImage(int width, int height, QImage::Format format); diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h index 7c64c4febb..c5821ae3ac 100644 --- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h +++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h @@ -132,7 +132,7 @@ inline QDataStream &operator<<(QDataStream &ds, const QEvdevKeyboardMap::Composi class QFdContainer { int m_fd; - Q_DISABLE_COPY(QFdContainer); + Q_DISABLE_COPY_MOVE(QFdContainer); public: explicit QFdContainer(int fd = -1) Q_DECL_NOTHROW : m_fd(fd) {} ~QFdContainer() { reset(); } diff --git a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h index 9b01c0a3fc..bc82351283 100644 --- a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h +++ b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h @@ -116,7 +116,7 @@ protected: friend GC qt_x11_get_brush_gc(QPainter *); private: - Q_DISABLE_COPY(QX11PaintEngine) + Q_DISABLE_COPY_MOVE(QX11PaintEngine) }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/xcb/qxcbsessionmanager.h b/src/plugins/platforms/xcb/qxcbsessionmanager.h index 0ad9445361..79c587b38d 100644 --- a/src/plugins/platforms/xcb/qxcbsessionmanager.h +++ b/src/plugins/platforms/xcb/qxcbsessionmanager.h @@ -85,8 +85,6 @@ public: private: QEventLoop *m_eventLoop; - - Q_DISABLE_COPY(QXcbSessionManager) }; QT_END_NAMESPACE diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h index b72e676419..2be88bb4c0 100644 --- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h +++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h @@ -82,7 +82,7 @@ public: private: QScopedPointer d_ptr; - Q_DISABLE_COPY(QXdgDesktopPortalTheme) + Q_DISABLE_COPY_MOVE(QXdgDesktopPortalTheme) }; QT_END_NAMESPACE diff --git a/src/plugins/printsupport/cups/qcupsprintengine_p.h b/src/plugins/printsupport/cups/qcupsprintengine_p.h index 2a1a83b9d7..c021b0c643 100644 --- a/src/plugins/printsupport/cups/qcupsprintengine_p.h +++ b/src/plugins/printsupport/cups/qcupsprintengine_p.h @@ -77,7 +77,7 @@ public: // end reimplementations QPdfPrintEngine private: - Q_DISABLE_COPY(QCupsPrintEngine) + Q_DISABLE_COPY_MOVE(QCupsPrintEngine) }; class QCupsPrintEnginePrivate : public QPdfPrintEnginePrivate @@ -91,7 +91,7 @@ public: void closePrintDevice() override; private: - Q_DISABLE_COPY(QCupsPrintEnginePrivate) + Q_DISABLE_COPY_MOVE(QCupsPrintEnginePrivate) void changePrinter(const QString &newPrinter); void setPageSize(const QPageSize &pageSize); diff --git a/src/plugins/printsupport/windows/qwindowsprintersupport.h b/src/plugins/printsupport/windows/qwindowsprintersupport.h index 4267701145..400701628e 100644 --- a/src/plugins/printsupport/windows/qwindowsprintersupport.h +++ b/src/plugins/printsupport/windows/qwindowsprintersupport.h @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE class QWindowsPrinterSupport : public QPlatformPrinterSupport { - Q_DISABLE_COPY(QWindowsPrinterSupport) + Q_DISABLE_COPY_MOVE(QWindowsPrinterSupport) public: QWindowsPrinterSupport(); ~QWindowsPrinterSupport() override; diff --git a/src/plugins/styles/android/qandroidstyle_p.h b/src/plugins/styles/android/qandroidstyle_p.h index 3faa08afb9..6cb30a2f79 100644 --- a/src/plugins/styles/android/qandroidstyle_p.h +++ b/src/plugins/styles/android/qandroidstyle_p.h @@ -371,7 +371,7 @@ public: void unpolish(QWidget *widget); private: - Q_DISABLE_COPY(QAndroidStyle) + Q_DISABLE_COPY_MOVE(QAndroidStyle) static ItemType qtControl(QStyle::ComplexControl control); static ItemType qtControl(QStyle::ContentsType contentsType); static ItemType qtControl(QStyle::ControlElement controlElement); diff --git a/src/plugins/styles/mac/qmacstyle_mac_p.h b/src/plugins/styles/mac/qmacstyle_mac_p.h index d6874001d3..88f104cccf 100644 --- a/src/plugins/styles/mac/qmacstyle_mac_p.h +++ b/src/plugins/styles/mac/qmacstyle_mac_p.h @@ -115,7 +115,7 @@ public: const QWidget *widget = 0) const; private: - Q_DISABLE_COPY(QMacStyle) + Q_DISABLE_COPY_MOVE(QMacStyle) Q_DECLARE_PRIVATE(QMacStyle) }; diff --git a/src/plugins/styles/windowsvista/qwindowsvistastyle_p.h b/src/plugins/styles/windowsvista/qwindowsvistastyle_p.h index 0ebb0eb41a..43a2a670f8 100644 --- a/src/plugins/styles/windowsvista/qwindowsvistastyle_p.h +++ b/src/plugins/styles/windowsvista/qwindowsvistastyle_p.h @@ -99,7 +99,7 @@ public: QPalette standardPalette() const override; private: - Q_DISABLE_COPY(QWindowsVistaStyle) + Q_DISABLE_COPY_MOVE(QWindowsVistaStyle) Q_DECLARE_PRIVATE(QWindowsVistaStyle) friend class QStyleFactory; }; diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle_p.h b/src/plugins/styles/windowsvista/qwindowsxpstyle_p.h index 7e9f4ddda6..0f70105b0e 100644 --- a/src/plugins/styles/windowsvista/qwindowsxpstyle_p.h +++ b/src/plugins/styles/windowsvista/qwindowsxpstyle_p.h @@ -96,7 +96,7 @@ public: const QWidget *widget = nullptr) const override; private: - Q_DISABLE_COPY(QWindowsXPStyle) + Q_DISABLE_COPY_MOVE(QWindowsXPStyle) Q_DECLARE_PRIVATE(QWindowsXPStyle) friend class QStyleFactory; }; diff --git a/src/printsupport/widgets/qcupsjobwidget_p.h b/src/printsupport/widgets/qcupsjobwidget_p.h index 4b6b047e26..42da9c7580 100644 --- a/src/printsupport/widgets/qcupsjobwidget_p.h +++ b/src/printsupport/widgets/qcupsjobwidget_p.h @@ -113,7 +113,7 @@ private: int m_savedPriority; QCUPSSupport::JobSheets m_savedJobSheets; - Q_DISABLE_COPY(QCupsJobWidget) + Q_DISABLE_COPY_MOVE(QCupsJobWidget) }; QT_END_NAMESPACE diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index ba03384db5..9f0cdb0109 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -294,8 +294,9 @@ IOPMAssertionID powerID; #endif class TestMethods { - Q_DISABLE_COPY(TestMethods) - public: +public: + Q_DISABLE_COPY_MOVE(TestMethods) + typedef std::vector MetaMethods; explicit TestMethods(const QObject *o, const MetaMethods &m = MetaMethods()); @@ -1605,7 +1606,7 @@ FatalSignalHandler::~FatalSignalHandler() // Helper class for resolving symbol names by dynamically loading "dbghelp.dll". class DebugSymbolResolver { - Q_DISABLE_COPY(DebugSymbolResolver) + Q_DISABLE_COPY_MOVE(DebugSymbolResolver) public: struct Symbol { Symbol() : name(nullptr), address(0) {} diff --git a/src/tools/uic/driver.h b/src/tools/uic/driver.h index 8d497c39fd..3808855783 100644 --- a/src/tools/uic/driver.h +++ b/src/tools/uic/driver.h @@ -49,7 +49,7 @@ class DomButtonGroup; class Driver { - Q_DISABLE_COPY(Driver) + Q_DISABLE_COPY_MOVE(Driver) public: Driver(); virtual ~Driver(); diff --git a/src/tools/uic/uic.h b/src/tools/uic/uic.h index 17cb54515b..af5f42c6db 100644 --- a/src/tools/uic/uic.h +++ b/src/tools/uic/uic.h @@ -53,7 +53,7 @@ struct Option; class Uic { - Q_DISABLE_COPY(Uic) + Q_DISABLE_COPY_MOVE(Uic) public: Uic(Driver *driver); ~Uic(); diff --git a/src/widgets/dialogs/qfiledialog_p.h b/src/widgets/dialogs/qfiledialog_p.h index 2e49696b77..96d0c1190e 100644 --- a/src/widgets/dialogs/qfiledialog_p.h +++ b/src/widgets/dialogs/qfiledialog_p.h @@ -290,7 +290,7 @@ private: virtual void helperPrepareShow(QPlatformDialogHelper *) override; virtual void helperDone(QDialog::DialogCode, QPlatformDialogHelper *) override; - Q_DISABLE_COPY(QFileDialogPrivate) + Q_DISABLE_COPY_MOVE(QFileDialogPrivate) }; class QFileDialogLineEdit : public QLineEdit diff --git a/src/widgets/dialogs/qwizard_win_p.h b/src/widgets/dialogs/qwizard_win_p.h index d302dedaa3..02c5e52c2c 100644 --- a/src/widgets/dialogs/qwizard_win_p.h +++ b/src/widgets/dialogs/qwizard_win_p.h @@ -84,7 +84,7 @@ class QWizard; class QVistaHelper : public QObject { - Q_DISABLE_COPY(QVistaHelper) + Q_DISABLE_COPY_MOVE(QVistaHelper) public: QVistaHelper(QWizard *wizard); ~QVistaHelper() override; diff --git a/src/widgets/effects/qgraphicseffect_p.h b/src/widgets/effects/qgraphicseffect_p.h index c5c7ff5900..2f3bd2f7fd 100644 --- a/src/widgets/effects/qgraphicseffect_p.h +++ b/src/widgets/effects/qgraphicseffect_p.h @@ -88,7 +88,7 @@ protected: private: Q_DECLARE_PRIVATE(QGraphicsEffectSource) - Q_DISABLE_COPY(QGraphicsEffectSource) + Q_DISABLE_COPY_MOVE(QGraphicsEffectSource) friend class QGraphicsEffect; friend class QGraphicsEffectPrivate; friend class QGraphicsScenePrivate; diff --git a/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h b/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h index b6387a2c56..eb6bbbf49b 100644 --- a/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h +++ b/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h @@ -99,7 +99,7 @@ protected: private : Q_DECLARE_PRIVATE(QGraphicsSceneBspTreeIndex) - Q_DISABLE_COPY(QGraphicsSceneBspTreeIndex) + Q_DISABLE_COPY_MOVE(QGraphicsSceneBspTreeIndex) Q_PRIVATE_SLOT(d_func(), void _q_updateSortCache()) Q_PRIVATE_SLOT(d_func(), void _q_updateIndex()) diff --git a/src/widgets/graphicsview/qgraphicssceneindex_p.h b/src/widgets/graphicsview/qgraphicssceneindex_p.h index c86df0e209..86637e836b 100644 --- a/src/widgets/graphicsview/qgraphicssceneindex_p.h +++ b/src/widgets/graphicsview/qgraphicssceneindex_p.h @@ -115,7 +115,7 @@ protected: friend class QGraphicsItemPrivate; friend class QGraphicsSceneBspTreeIndex; private: - Q_DISABLE_COPY(QGraphicsSceneIndex) + Q_DISABLE_COPY_MOVE(QGraphicsSceneIndex) Q_DECLARE_PRIVATE(QGraphicsSceneIndex) }; diff --git a/src/widgets/graphicsview/qsimplex_p.h b/src/widgets/graphicsview/qsimplex_p.h index 2342da2437..369f2f5f82 100644 --- a/src/widgets/graphicsview/qsimplex_p.h +++ b/src/widgets/graphicsview/qsimplex_p.h @@ -150,7 +150,7 @@ struct QSimplexConstraint class QSimplex { - Q_DISABLE_COPY(QSimplex) + Q_DISABLE_COPY_MOVE(QSimplex) public: QSimplex(); ~QSimplex(); diff --git a/src/widgets/itemviews/qcolumnviewgrip_p.h b/src/widgets/itemviews/qcolumnviewgrip_p.h index 7e2793074b..5eb8012204 100644 --- a/src/widgets/itemviews/qcolumnviewgrip_p.h +++ b/src/widgets/itemviews/qcolumnviewgrip_p.h @@ -82,7 +82,7 @@ protected: private: Q_DECLARE_PRIVATE(QColumnViewGrip) - Q_DISABLE_COPY(QColumnViewGrip) + Q_DISABLE_COPY_MOVE(QColumnViewGrip) }; class QColumnViewGripPrivate : public QWidgetPrivate diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h index 7ebc2cd58e..1f995278f4 100644 --- a/src/widgets/kernel/qwidget_p.h +++ b/src/widgets/kernel/qwidget_p.h @@ -150,7 +150,7 @@ public: } private: - Q_DISABLE_COPY(QWidgetBackingStoreTracker) + Q_DISABLE_COPY_MOVE(QWidgetBackingStoreTracker) private: QWidgetBackingStore* m_ptr; diff --git a/src/widgets/kernel/qwidgetbackingstore_p.h b/src/widgets/kernel/qwidgetbackingstore_p.h index 53ccda850a..41469a04bb 100644 --- a/src/widgets/kernel/qwidgetbackingstore_p.h +++ b/src/widgets/kernel/qwidgetbackingstore_p.h @@ -305,7 +305,7 @@ private: friend class QWidget; friend class QBackingStore; - Q_DISABLE_COPY(QWidgetBackingStore) + Q_DISABLE_COPY_MOVE(QWidgetBackingStore) }; QT_END_NAMESPACE diff --git a/src/widgets/statemachine/qbasickeyeventtransition_p.h b/src/widgets/statemachine/qbasickeyeventtransition_p.h index 5007b79739..7e1b978bba 100644 --- a/src/widgets/statemachine/qbasickeyeventtransition_p.h +++ b/src/widgets/statemachine/qbasickeyeventtransition_p.h @@ -84,7 +84,7 @@ protected: void onTransition(QEvent *) override; private: - Q_DISABLE_COPY(QBasicKeyEventTransition) + Q_DISABLE_COPY_MOVE(QBasicKeyEventTransition) Q_DECLARE_PRIVATE(QBasicKeyEventTransition) }; diff --git a/src/widgets/statemachine/qbasicmouseeventtransition_p.h b/src/widgets/statemachine/qbasicmouseeventtransition_p.h index 93d2a5ec61..132e223535 100644 --- a/src/widgets/statemachine/qbasicmouseeventtransition_p.h +++ b/src/widgets/statemachine/qbasicmouseeventtransition_p.h @@ -87,7 +87,7 @@ protected: void onTransition(QEvent *) override; private: - Q_DISABLE_COPY(QBasicMouseEventTransition) + Q_DISABLE_COPY_MOVE(QBasicMouseEventTransition) Q_DECLARE_PRIVATE(QBasicMouseEventTransition) }; diff --git a/src/widgets/styles/qdrawutil.cpp b/src/widgets/styles/qdrawutil.cpp index 299dbb9f82..d30b43a679 100644 --- a/src/widgets/styles/qdrawutil.cpp +++ b/src/widgets/styles/qdrawutil.cpp @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE namespace { class PainterStateGuard { - Q_DISABLE_COPY(PainterStateGuard) + Q_DISABLE_COPY_MOVE(PainterStateGuard) public: explicit PainterStateGuard(QPainter *p) : m_painter(p) {} ~PainterStateGuard() diff --git a/src/widgets/styles/qstylesheetstyle_p.h b/src/widgets/styles/qstylesheetstyle_p.h index d4edb83525..9c4b87fc32 100644 --- a/src/widgets/styles/qstylesheetstyle_p.h +++ b/src/widgets/styles/qstylesheetstyle_p.h @@ -173,7 +173,7 @@ public: static int numinstances; private: - Q_DISABLE_COPY(QStyleSheetStyle) + Q_DISABLE_COPY_MOVE(QStyleSheetStyle) Q_DECLARE_PRIVATE(QStyleSheetStyle) }; diff --git a/src/widgets/styles/qwindowsstyle_p.h b/src/widgets/styles/qwindowsstyle_p.h index 7993b9f1c6..47816ff651 100644 --- a/src/widgets/styles/qwindowsstyle_p.h +++ b/src/widgets/styles/qwindowsstyle_p.h @@ -102,7 +102,7 @@ protected: QWindowsStyle(QWindowsStylePrivate &dd); private: - Q_DISABLE_COPY(QWindowsStyle) + Q_DISABLE_COPY_MOVE(QWindowsStyle) Q_DECLARE_PRIVATE(QWindowsStyle) }; diff --git a/src/widgets/widgets/qmenu_p.h b/src/widgets/widgets/qmenu_p.h index 721a35bf90..c39dd33b08 100644 --- a/src/widgets/widgets/qmenu_p.h +++ b/src/widgets/widgets/qmenu_p.h @@ -115,7 +115,7 @@ private: class QMenuSloppyState { - Q_DISABLE_COPY(QMenuSloppyState) + Q_DISABLE_COPY_MOVE(QMenuSloppyState) public: QMenuSloppyState() : m_enabled(false) diff --git a/src/widgets/widgets/qwidgetresizehandler_p.h b/src/widgets/widgets/qwidgetresizehandler_p.h index b87bbd6229..89bc759cc2 100644 --- a/src/widgets/widgets/qwidgetresizehandler_p.h +++ b/src/widgets/widgets/qwidgetresizehandler_p.h @@ -100,7 +100,7 @@ protected: void keyPressEvent(QKeyEvent *e); private: - Q_DISABLE_COPY(QWidgetResizeHandler) + Q_DISABLE_COPY_MOVE(QWidgetResizeHandler) enum MousePosition { Nowhere, diff --git a/src/widgets/widgets/qwidgettextcontrol_p.h b/src/widgets/widgets/qwidgettextcontrol_p.h index 5431298387..202ba36454 100644 --- a/src/widgets/widgets/qwidgettextcontrol_p.h +++ b/src/widgets/widgets/qwidgettextcontrol_p.h @@ -267,7 +267,7 @@ protected: virtual bool event(QEvent *e) override; private: - Q_DISABLE_COPY(QWidgetTextControl) + Q_DISABLE_COPY_MOVE(QWidgetTextControl) Q_PRIVATE_SLOT(d_func(), void _q_updateCurrentCharFormatAndSelection()) Q_PRIVATE_SLOT(d_func(), void _q_emitCursorPosChanged(const QTextCursor &)) Q_PRIVATE_SLOT(d_func(), void _q_deleteSelected())