summaryrefslogtreecommitdiffstats
path: root/src/dbus
diff options
context:
space:
mode:
authorIvan Solovev <[email protected]>2025-06-17 17:23:00 +0200
committerMarc Mutz <[email protected]>2025-06-18 16:05:07 +0000
commit98710e210f1f9eccacbd90025d76924b06dafe39 (patch)
tree0bae4e8db8fd93a357f06beb918e4a27c30a5ceb /src/dbus
parentc8fa1b736e975b89bd512bbf5c1d02bfcf1c046f (diff)
QDBusPendingCall: add move-constructor
The class uses QESDP for the d_ptr, so the default implementation is fine. This requires to add the QT_{DECLARE,DEFINE}_QESDP_SPECIALIZATION_DTOR pair of macros, so that the compiler sees the declaration of the d_ptr destructor. [ChangeLog][QtDBus][QDBusPendingCall] Added move constructor. Change-Id: I687459397ab7fb1dbd31cea5a42b7580ffe6c749 Reviewed-by: Marc Mutz <[email protected]>
Diffstat (limited to 'src/dbus')
-rw-r--r--src/dbus/qdbuspendingcall.cpp10
-rw-r--r--src/dbus/qdbuspendingcall.h4
2 files changed, 14 insertions, 0 deletions
diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp
index 063ee4760b1..cd222c9ffa5 100644
--- a/src/dbus/qdbuspendingcall.cpp
+++ b/src/dbus/qdbuspendingcall.cpp
@@ -227,6 +227,15 @@ void QDBusPendingCallPrivate::waitForFinishedWithGui()
}
/*!
+ \fn QDBusPendingCall::QDBusPendingCall(QDBusPendingCall &&other)
+ \since 6.11
+
+ Moves \a other into this object.
+
+ \include qdbuspendingcall.cpp partially-formed
+*/
+
+/*!
Creates a copy of the \a other pending asynchronous call. Note
that both objects will refer to the same pending call.
*/
@@ -258,6 +267,7 @@ QDBusPendingCall::~QDBusPendingCall()
// d deleted by QExplicitlySharedDataPointer
}
+QT_DEFINE_QESDP_SPECIALIZATION_DTOR(QDBusPendingCallPrivate)
/*!
\fn QDBusPendingCall &QDBusPendingCall::operator=(QDBusPendingCall &&other)
diff --git a/src/dbus/qdbuspendingcall.h b/src/dbus/qdbuspendingcall.h
index c2763762239..0db6667e5ec 100644
--- a/src/dbus/qdbuspendingcall.h
+++ b/src/dbus/qdbuspendingcall.h
@@ -19,10 +19,14 @@ class QDBusError;
class QDBusPendingCallWatcher;
class QDBusPendingCallPrivate;
+
+QT_DECLARE_QESDP_SPECIALIZATION_DTOR(QDBusPendingCallPrivate)
+
class Q_DBUS_EXPORT QDBusPendingCall
{
public:
QDBusPendingCall(const QDBusPendingCall &other);
+ QDBusPendingCall(QDBusPendingCall &&other) noexcept = default;
~QDBusPendingCall();
QDBusPendingCall &operator=(QDBusPendingCall &&other) noexcept { swap(other); return *this; }
QDBusPendingCall &operator=(const QDBusPendingCall &other);