summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/dbus/qdbuspendingcall.cpp20
-rw-r--r--src/dbus/qdbuspendingcall.h5
2 files changed, 3 insertions, 22 deletions
diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp
index 875891786a..06d0ebb08c 100644
--- a/src/dbus/qdbuspendingcall.cpp
+++ b/src/dbus/qdbuspendingcall.cpp
@@ -94,7 +94,8 @@ using namespace Qt::StringLiterals;
void QDBusPendingCallWatcherHelper::add(QDBusPendingCallWatcher *watcher)
{
- connect(this, SIGNAL(finished()), watcher, SLOT(_q_finished()), Qt::QueuedConnection);
+ connect(this, &QDBusPendingCallWatcherHelper::finished, watcher,
+ [watcher] { Q_EMIT watcher->finished(watcher); }, Qt::QueuedConnection);
}
QDBusPendingCallPrivate::~QDBusPendingCallPrivate()
@@ -445,28 +446,13 @@ QDBusPendingCall QDBusPendingCall::fromCompletedCall(const QDBusMessage &msg)
return QDBusPendingCall(d);
}
-
-class QDBusPendingCallWatcherPrivate: public QObjectPrivate
-{
-public:
- void _q_finished();
-
- Q_DECLARE_PUBLIC(QDBusPendingCallWatcher)
-};
-
-inline void QDBusPendingCallWatcherPrivate::_q_finished()
-{
- Q_Q(QDBusPendingCallWatcher);
- emit q->finished(q);
-}
-
/*!
Creates a QDBusPendingCallWatcher object to watch for replies on the
asynchronous pending call \a call and sets this object's parent
to \a parent.
*/
QDBusPendingCallWatcher::QDBusPendingCallWatcher(const QDBusPendingCall &call, QObject *parent)
- : QObject(*new QDBusPendingCallWatcherPrivate, parent), QDBusPendingCall(call)
+ : QObject(parent), QDBusPendingCall(call)
{
if (d) { // QDBusPendingCall::d
const auto locker = qt_scoped_lock(d->mutex);
diff --git a/src/dbus/qdbuspendingcall.h b/src/dbus/qdbuspendingcall.h
index eae68144fe..c276376223 100644
--- a/src/dbus/qdbuspendingcall.h
+++ b/src/dbus/qdbuspendingcall.h
@@ -57,7 +57,6 @@ private:
Q_DECLARE_SHARED(QDBusPendingCall)
-class QDBusPendingCallWatcherPrivate;
class Q_DBUS_EXPORT QDBusPendingCallWatcher: public QObject, public QDBusPendingCall
{
Q_OBJECT
@@ -73,10 +72,6 @@ public:
Q_SIGNALS:
void finished(QDBusPendingCallWatcher *self = nullptr);
-
-private:
- Q_DECLARE_PRIVATE(QDBusPendingCallWatcher)
- Q_PRIVATE_SLOT(d_func(), void _q_finished())
};
QT_END_NAMESPACE