diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-10-23 17:37:16 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-10-28 09:17:00 (GMT) |
commit | da9a3a919326e35730b13d0660bb4a7b64e2c81c (patch) | |
tree | 3523ba1f774e080894b84615ce3b14e900116e2e /src/dbus/qdbusconnectioninterface.cpp | |
parent | 1176ecf0b533279e5a1c97f183e5c5f1c57fb188 (diff) | |
download | Qt-da9a3a919326e35730b13d0660bb4a7b64e2c81c.zip Qt-da9a3a919326e35730b13d0660bb4a7b64e2c81c.tar.gz Qt-da9a3a919326e35730b13d0660bb4a7b64e2c81c.tar.bz2 |
Add a warning to user's connecting to serviceOwnerChanged directly
We want people to not use this signal directly.
Diffstat (limited to 'src/dbus/qdbusconnectioninterface.cpp')
-rw-r--r-- | src/dbus/qdbusconnectioninterface.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dbus/qdbusconnectioninterface.cpp b/src/dbus/qdbusconnectioninterface.cpp index 8670ed5..414d318 100644 --- a/src/dbus/qdbusconnectioninterface.cpp +++ b/src/dbus/qdbusconnectioninterface.cpp @@ -336,8 +336,14 @@ void QDBusConnectionInterface::connectNotify(const char *signalName) else if (qstrcmp(signalName, SIGNAL(serviceUnregistered(QString))) == 0) QDBusAbstractInterface::connectNotify(SIGNAL(NameLost(QString))); - else if (qstrcmp(signalName, SIGNAL(serviceOwnerChanged(QString,QString,QString))) == 0) + else if (qstrcmp(signalName, SIGNAL(serviceOwnerChanged(QString,QString,QString))) == 0) { + static bool warningPrinted = false; + if (!warningPrinted) { + qWarning("Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)"); + warningPrinted = true; + } QDBusAbstractInterface::connectNotify(SIGNAL(NameOwnerChanged(QString,QString,QString))); + } } /*! |