QDBusPendingReplyBase: add missing copy operations

QDBusPendingReplyBase declares its destructor (and defines it,
as defaulted, out-of-line). I'm not sure why that's the case, since
QDBusPendingReplyBase isn't polymorphic. This generates warnings when
QDBusPendingReplyBase objects are copied in the subclasses, since
the copy operations are deprecated due to the presence of the
destructor.
Add the missing copy operations, and mark destructor and copies
to be removed in Qt 7.

Change-Id: Iec2c98f5e512c3f19e5d28ab2ce2dba365c66175
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Giuseppe D'Angelo 2025-01-07 13:04:42 +01:00
parent 71e53405a3
commit 0ab44505c8
2 changed files with 7 additions and 0 deletions

View File

@ -213,9 +213,11 @@ QDBusPendingReplyBase::QDBusPendingReplyBase()
{
}
#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
QDBusPendingReplyBase::~QDBusPendingReplyBase()
{
}
#endif
void QDBusPendingReplyBase::assign(const QDBusPendingCall &other)
{

View File

@ -17,7 +17,12 @@ class Q_DBUS_EXPORT QDBusPendingReplyBase : public QDBusPendingCall
{
protected:
QDBusPendingReplyBase();
#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
~QDBusPendingReplyBase();
QDBusPendingReplyBase(const QDBusPendingReplyBase &) = default;
QDBusPendingReplyBase &operator=(const QDBusPendingReplyBase &) = default;
#endif
void assign(const QDBusPendingCall &call);
void assign(const QDBusMessage &message);