dbus: Port to new connect syntax
Any connect requiring a lambda to be ported or function casts were not touched Change-Id: I1718121986ba6632b5754efa631f7b599358e186 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
06729450b7
commit
fed6c094bf
@ -1177,8 +1177,8 @@ void QDBusConnectionPrivate::createBusService()
|
|||||||
ref.deref(); // busService has increased the refcounting to us
|
ref.deref(); // busService has increased the refcounting to us
|
||||||
// avoid cyclic refcounting
|
// avoid cyclic refcounting
|
||||||
|
|
||||||
QObject::connect(this, SIGNAL(callWithCallbackFailed(QDBusError,QDBusMessage)),
|
QObject::connect(this, &QDBusConnectionPrivate::callWithCallbackFailed,
|
||||||
busService, SIGNAL(callWithCallbackFailed(QDBusError,QDBusMessage)),
|
busService, emit &QDBusConnectionInterface::callWithCallbackFailed,
|
||||||
Qt::QueuedConnection);
|
Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,10 +158,10 @@ QDBusConnectionInterface::QDBusConnectionInterface(const QDBusConnection &connec
|
|||||||
QDBusUtil::dbusPath(),
|
QDBusUtil::dbusPath(),
|
||||||
DBUS_INTERFACE_DBUS, connection, parent)
|
DBUS_INTERFACE_DBUS, connection, parent)
|
||||||
{
|
{
|
||||||
connect(this, SIGNAL(NameAcquired(QString)), this, SIGNAL(serviceRegistered(QString)));
|
connect(this, &QDBusConnectionInterface::NameAcquired, this, emit &QDBusConnectionInterface::serviceRegistered);
|
||||||
connect(this, SIGNAL(NameLost(QString)), this, SIGNAL(serviceUnregistered(QString)));
|
connect(this, &QDBusConnectionInterface::NameLost, this, emit &QDBusConnectionInterface::serviceUnregistered);
|
||||||
connect(this, SIGNAL(NameOwnerChanged(QString,QString,QString)),
|
connect(this, &QDBusConnectionInterface::NameOwnerChanged,
|
||||||
this, SIGNAL(serviceOwnerChanged(QString,QString,QString)));
|
this, emit &QDBusConnectionInterface::serviceOwnerChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -208,14 +208,14 @@ static dbus_bool_t qDBusAddWatch(DBusWatch *watch, void *data)
|
|||||||
watcher.watch = watch;
|
watcher.watch = watch;
|
||||||
watcher.read = new QSocketNotifier(fd, QSocketNotifier::Read, d);
|
watcher.read = new QSocketNotifier(fd, QSocketNotifier::Read, d);
|
||||||
watcher.read->setEnabled(q_dbus_watch_get_enabled(watch));
|
watcher.read->setEnabled(q_dbus_watch_get_enabled(watch));
|
||||||
d->connect(watcher.read, SIGNAL(activated(int)), SLOT(socketRead(int)));
|
d->connect(watcher.read, &QSocketNotifier::activated, d, &QDBusConnectionPrivate::socketRead);
|
||||||
}
|
}
|
||||||
if (flags & DBUS_WATCH_WRITABLE) {
|
if (flags & DBUS_WATCH_WRITABLE) {
|
||||||
//qDebug("addWriteWatch %d", fd);
|
//qDebug("addWriteWatch %d", fd);
|
||||||
watcher.watch = watch;
|
watcher.watch = watch;
|
||||||
watcher.write = new QSocketNotifier(fd, QSocketNotifier::Write, d);
|
watcher.write = new QSocketNotifier(fd, QSocketNotifier::Write, d);
|
||||||
watcher.write->setEnabled(q_dbus_watch_get_enabled(watch));
|
watcher.write->setEnabled(q_dbus_watch_get_enabled(watch));
|
||||||
d->connect(watcher.write, SIGNAL(activated(int)), SLOT(socketWrite(int)));
|
d->connect(watcher.write, &QSocketNotifier::activated, d, &QDBusConnectionPrivate::socketWrite);
|
||||||
}
|
}
|
||||||
d->watchers.insertMulti(fd, watcher);
|
d->watchers.insertMulti(fd, watcher);
|
||||||
|
|
||||||
@ -1892,8 +1892,8 @@ QDBusMessage QDBusConnectionPrivate::sendWithReply(const QDBusMessage &message,
|
|||||||
if (sendMode == QDBus::BlockWithGui) {
|
if (sendMode == QDBus::BlockWithGui) {
|
||||||
pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
|
pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
loop.connect(pcall->watcherHelper, SIGNAL(reply(QDBusMessage)), SLOT(quit()));
|
loop.connect(pcall->watcherHelper, &QDBusPendingCallWatcherHelper::reply, &loop, &QEventLoop::quit);
|
||||||
loop.connect(pcall->watcherHelper, SIGNAL(error(QDBusError,QDBusMessage)), SLOT(quit()));
|
loop.connect(pcall->watcherHelper, &QDBusPendingCallWatcherHelper::error, &loop, &QEventLoop::quit);
|
||||||
|
|
||||||
// enter the event loop and wait for a reply
|
// enter the event loop and wait for a reply
|
||||||
loop.exec(QEventLoop::ExcludeUserInputEvents | QEventLoop::WaitForMoreEvents);
|
loop.exec(QEventLoop::ExcludeUserInputEvents | QEventLoop::WaitForMoreEvents);
|
||||||
@ -2078,7 +2078,7 @@ void QDBusConnectionPrivate::addSignalHook(const QString &key, const SignalHook
|
|||||||
}
|
}
|
||||||
|
|
||||||
signalHooks.insertMulti(key, hook);
|
signalHooks.insertMulti(key, hook);
|
||||||
connect(hook.obj, SIGNAL(destroyed(QObject*)), SLOT(objectDestroyed(QObject*)),
|
connect(hook.obj, &QObject::destroyed, this, &QDBusConnectionPrivate::objectDestroyed,
|
||||||
Qt::ConnectionType(Qt::BlockingQueuedConnection | Qt::UniqueConnection));
|
Qt::ConnectionType(Qt::BlockingQueuedConnection | Qt::UniqueConnection));
|
||||||
|
|
||||||
MatchRefCountHash::iterator mit = matchRefCounts.find(hook.matchRule);
|
MatchRefCountHash::iterator mit = matchRefCounts.find(hook.matchRule);
|
||||||
@ -2204,7 +2204,7 @@ QDBusConnectionPrivate::removeSignalHookNoLock(SignalHookHash::Iterator it)
|
|||||||
|
|
||||||
void QDBusConnectionPrivate::registerObject(const ObjectTreeNode *node)
|
void QDBusConnectionPrivate::registerObject(const ObjectTreeNode *node)
|
||||||
{
|
{
|
||||||
connect(node->obj, SIGNAL(destroyed(QObject*)), SLOT(objectDestroyed(QObject*)),
|
connect(node->obj, &QObject::destroyed, this, &QDBusConnectionPrivate::objectDestroyed,
|
||||||
Qt::ConnectionType(Qt::BlockingQueuedConnection | Qt::UniqueConnection));
|
Qt::ConnectionType(Qt::BlockingQueuedConnection | Qt::UniqueConnection));
|
||||||
|
|
||||||
if (node->flags & (QDBusConnection::ExportAdaptors
|
if (node->flags & (QDBusConnection::ExportAdaptors
|
||||||
|
Loading…
Reference in New Issue
Block a user