QtDBus: Replace some text-based singnal-slot connections
Use type-checked connections for better run-time performance and compile-time type checking. This excludes connections to private slots that are not trivial to replace. Change-Id: I97f591dba880f8d09c73565f2b5555524f6ab4a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
5a3784bba3
commit
6f05e91695
@ -52,7 +52,7 @@ QDBusPendingCall pcall = interface->asyncCall("Process"_L1, value);
|
|||||||
|
|
||||||
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pcall);
|
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pcall);
|
||||||
|
|
||||||
QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
|
QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this,
|
||||||
this, SLOT(callFinishedSlot(QDBusPendingCallWatcher*)));
|
&Abstract_DBus_Interface::callFinishedSlot);
|
||||||
//! [1]
|
//! [1]
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,8 @@ void DBus_PendingCall_Interface::callInterfaceMain()
|
|||||||
QDBusPendingCall async = iface->asyncCall("RemoteMethod", value1, value2);
|
QDBusPendingCall async = iface->asyncCall("RemoteMethod", value1, value2);
|
||||||
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(async, this);
|
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(async, this);
|
||||||
|
|
||||||
QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
|
QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this,
|
||||||
this, SLOT(callFinishedSlot(QDBusPendingCallWatcher*)));
|
&DBus_PendingCall_Interface::callFinishedSlot);
|
||||||
//! [0]
|
//! [0]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2428,8 +2428,8 @@ void QDBusConnectionPrivate::registerObject(const ObjectTreeNode *node)
|
|||||||
connector->connectAllSignals(node->obj);
|
connector->connectAllSignals(node->obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(connector, SIGNAL(relaySignal(QObject*,const QMetaObject*,int,QVariantList)),
|
connect(connector, &QDBusAdaptorConnector::relaySignal, this,
|
||||||
this, SLOT(relaySignal(QObject*,const QMetaObject*,int,QVariantList)),
|
&QDBusConnectionPrivate::relaySignal,
|
||||||
Qt::ConnectionType(Qt::QueuedConnection | Qt::UniqueConnection));
|
Qt::ConnectionType(Qt::QueuedConnection | Qt::UniqueConnection));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user