summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusintegrator.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-02-10 11:57:05 +0100
committerOlivier Goffart <olivier.goffart@nokia.com>2011-02-10 12:23:31 +0100
commit72e0778c9b5bdae58596090b114d5d0e7092f911 (patch)
tree53c31d9b61700c2c6db672767e24953192c5373c /src/dbus/qdbusintegrator.cpp
parentabb425e3db6c20c5271788cb1ec4e1fe37b9ea5b (diff)
parent50bb35a5ca48816f7563d1055071b4caa7791056 (diff)
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts: doc/src/development/qmake-manual.qdoc mkspecs/symbian-gcce/qmake.conf qmake/project.cpp src/corelib/global/qnamespace.qdoc src/declarative/graphicsitems/qdeclarativetext.cpp src/gui/text/qtextdocumentlayout.cpp src/gui/text/qtextdocumentlayout_p.h tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp tests/auto/networkselftest/networkselftest.pro tests/auto/qscriptengine/tst_qscriptengine.cpp tools/designer/src/components/signalsloteditor/signalslot_utils.cpp tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf tools/qdoc3/test/qt_ja_JP.qdocconf tools/qdoc3/test/qt_zh_CN.qdocconf
Diffstat (limited to 'src/dbus/qdbusintegrator.cpp')
-rw-r--r--src/dbus/qdbusintegrator.cpp38
1 files changed, 14 insertions, 24 deletions
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 13585242fb..14138e082c 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -2074,30 +2074,20 @@ void QDBusConnectionPrivate::connectSignal(const QString &key, const SignalHook
if (connection) {
qDBusDebug("Adding rule: %s", hook.matchRule.constData());
- QDBusErrorInternal error;
- q_dbus_bus_add_match(connection, hook.matchRule, error);
- if (!!error) {
- QDBusError qerror = error;
- qWarning("QDBusConnectionPrivate::connectSignal: received error from D-Bus server "
- "while connecting signal to %s::%s: %s (%s)",
- hook.obj->metaObject()->className(),
- hook.obj->metaObject()->method(hook.midx).signature(),
- qPrintable(qerror.name()), qPrintable(qerror.message()));
- Q_ASSERT(false);
- } else {
- // Successfully connected the signal
- // Do we need to watch for this name?
- if (shouldWatchService(hook.service)) {
- WatchedServicesHash::mapped_type &data = watchedServices[hook.service];
- if (++data.refcount == 1) {
- // we need to watch for this service changing
- connectSignal(dbusServiceString(), QString(), dbusInterfaceString(),
- QLatin1String("NameOwnerChanged"), QStringList() << hook.service, QString(),
- this, SLOT(serviceOwnerChangedNoLock(QString,QString,QString)));
- data.owner = getNameOwnerNoCache(hook.service);
- qDBusDebug() << this << "Watching service" << hook.service << "for owner changes (current owner:"
- << data.owner << ")";
- }
+ q_dbus_bus_add_match(connection, hook.matchRule, NULL);
+
+ // Successfully connected the signal
+ // Do we need to watch for this name?
+ if (shouldWatchService(hook.service)) {
+ WatchedServicesHash::mapped_type &data = watchedServices[hook.service];
+ if (++data.refcount == 1) {
+ // we need to watch for this service changing
+ connectSignal(dbusServiceString(), QString(), dbusInterfaceString(),
+ QLatin1String("NameOwnerChanged"), QStringList() << hook.service, QString(),
+ this, SLOT(serviceOwnerChangedNoLock(QString,QString,QString)));
+ data.owner = getNameOwnerNoCache(hook.service);
+ qDBusDebug() << this << "Watching service" << hook.service << "for owner changes (current owner:"
+ << data.owner << ")";
}
}
}