From ef2b55ee65a971e02c953aff018a74137ba80492 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 15 Apr 2024 09:12:56 +0200 Subject: [PATCH] QXmlStreamEntityResolver: disable copying It's a polymorphic class, so disable copying as we do for all other interfaces, too. Disabling the copy/move SMFs requires manually restoring the default ctor. [ChangeLog][QtCore][Potentially Source-Incompatible Changes][QXmlStreamEntityResolver] Disabled the copy and move constructors and assignment operators. You can still provide them for your own subclasses, but you must do so explicitly. Change-Id: Ie2460f88664198707fdd4119376503f81a0f2a8d Reviewed-by: Ahmad Samir Reviewed-by: Ivan Solovev --- src/corelib/serialization/qxmlstream.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/serialization/qxmlstream.h b/src/corelib/serialization/qxmlstream.h index 7eeaa1c1cc..8a12c6d611 100644 --- a/src/corelib/serialization/qxmlstream.h +++ b/src/corelib/serialization/qxmlstream.h @@ -206,7 +206,9 @@ typedef QList QXmlStreamEntityDeclarations; class Q_CORE_EXPORT QXmlStreamEntityResolver { + Q_DISABLE_COPY_MOVE(QXmlStreamEntityResolver) public: + QXmlStreamEntityResolver() = default; virtual ~QXmlStreamEntityResolver(); virtual QString resolveEntity(const QString& publicId, const QString& systemId); virtual QString resolveUndeclaredEntity(const QString &name);