From 3b7f21996e5f012fe86b093239f17ed3b5bb7fa1 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 27 Aug 2024 18:40:26 +0200 Subject: [PATCH] QXmlString: fix ADL swap The classical Q_DECLARE_SHARED assumes it's placed right next to the class in the same namespace as its argument type. If that is not the case, then the free swap() function might not be found using ADL, since it was defined in an outer namespace. Since 6.8, we have NS-aware Q_DECLARE_SHARED versions, so use that. Change-Id: I2969c641b501b07b4ebb9fce46d2544bf788fc9b Reviewed-by: Thiago Macieira (cherry picked from commit 877fe0e7b3aada3f99bbf0415cba9daf97b067db) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/serialization/qxmlstream.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/serialization/qxmlstream.h b/src/corelib/serialization/qxmlstream.h index 8a12c6d6115..670d88f3f05 100644 --- a/src/corelib/serialization/qxmlstream.h +++ b/src/corelib/serialization/qxmlstream.h @@ -36,7 +36,7 @@ public: }; } -Q_DECLARE_SHARED(QtPrivate::QXmlString) +Q_DECLARE_SHARED_NS_EXT(QtPrivate, QXmlString) class QXmlStreamReaderPrivate;