summaryrefslogtreecommitdiffstats
path: root/src/dbus
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-11-19 12:44:10 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-11-24 20:29:54 (GMT)
commitad87a761207ac1155c55773270bb6583677ccd30 (patch)
tree6b1af694e0129a777fd82f29b35ee6deab0d8013 /src/dbus
parentad9a9657d2244e42b730482d8089ea7431f31773 (diff)
downloadQt-ad87a761207ac1155c55773270bb6583677ccd30.zip
Qt-ad87a761207ac1155c55773270bb6583677ccd30.tar.gz
Qt-ad87a761207ac1155c55773270bb6583677ccd30.tar.bz2
Small performance improvement: don't match the bus path.
We trust the bus, so no need to match per path. The sender and the interface should be enough for us.
Diffstat (limited to 'src/dbus')
-rw-r--r--src/dbus/qdbusservicewatcher.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/dbus/qdbusservicewatcher.cpp b/src/dbus/qdbusservicewatcher.cpp
index 1557b47..4328558 100644
--- a/src/dbus/qdbusservicewatcher.cpp
+++ b/src/dbus/qdbusservicewatcher.cpp
@@ -50,7 +50,6 @@
QT_BEGIN_NAMESPACE
Q_GLOBAL_STATIC_WITH_ARGS(QString, busService, (QLatin1String(DBUS_SERVICE_DBUS)))
-Q_GLOBAL_STATIC_WITH_ARGS(QString, busPath, (QLatin1String(DBUS_PATH_DBUS)))
Q_GLOBAL_STATIC_WITH_ARGS(QString, busInterface, (QLatin1String(DBUS_INTERFACE_DBUS)))
Q_GLOBAL_STATIC_WITH_ARGS(QString, signalName, (QLatin1String("NameOwnerChanged")))
@@ -127,7 +126,7 @@ QStringList QDBusServiceWatcherPrivate::matchArgsForService(const QString &servi
void QDBusServiceWatcherPrivate::addService(const QString &service)
{
QStringList matchArgs = matchArgsForService(service);
- connection.connect(*busService(), *busPath(), *busInterface(), *signalName(),
+ connection.connect(*busService(), QString(), *busInterface(), *signalName(),
matchArgs, QString(), q_func(),
SLOT(_q_serviceOwnerChanged(QString,QString,QString)));
}
@@ -135,7 +134,7 @@ void QDBusServiceWatcherPrivate::addService(const QString &service)
void QDBusServiceWatcherPrivate::removeService(const QString &service)
{
QStringList matchArgs = matchArgsForService(service);
- connection.disconnect(*busService(), *busPath(), *busInterface(), *signalName(),
+ connection.disconnect(*busService(), QString(), *busInterface(), *signalName(),
matchArgs, QString(), q_func(),
SLOT(_q_serviceOwnerChanged(QString,QString,QString)));
}