From fc8dad2f10e7976cfa778ca7d75e651012629b21 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 5 Jan 2023 10:06:33 -0300 Subject: QUrlQuery: add missing move constructor It wasn't added when this class was created in 5.0 because we couldn't add move constructors and still keep the ability to compile Qt with C++98 compilers. We've forgot to correct this shortcoming since 5.6. Fixes: QTBUG-109842 Pick-to: 6.5 Change-Id: I69ecc04064514f939896fffd17376b8243b73c52 Reviewed-by: Marc Mutz --- src/corelib/io/qurlquery.cpp | 10 ++++++++++ src/corelib/io/qurlquery.h | 1 + 2 files changed, 11 insertions(+) (limited to 'src/corelib/io') diff --git a/src/corelib/io/qurlquery.cpp b/src/corelib/io/qurlquery.cpp index 57e66142ca..d90c80be6d 100644 --- a/src/corelib/io/qurlquery.cpp +++ b/src/corelib/io/qurlquery.cpp @@ -363,6 +363,16 @@ QUrlQuery::QUrlQuery(const QUrlQuery &other) { } +/*! + \since 6.5 + Moves the contents of the \a other QUrlQuery object, including the query + delimiters. +*/ +QUrlQuery::QUrlQuery(QUrlQuery &&other) noexcept + : d(std::move(other.d)) +{ +} + /*! Copies the contents of the \a other QUrlQuery object, including the query delimiters. diff --git a/src/corelib/io/qurlquery.h b/src/corelib/io/qurlquery.h index 16dcc44ff2..411f19a4c8 100644 --- a/src/corelib/io/qurlquery.h +++ b/src/corelib/io/qurlquery.h @@ -30,6 +30,7 @@ public: } QUrlQuery(const QUrlQuery &other); + QUrlQuery(QUrlQuery &&other) noexcept; QUrlQuery &operator=(const QUrlQuery &other); QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QUrlQuery) ~QUrlQuery(); -- cgit v1.2.3