summaryrefslogtreecommitdiffstats
path: root/src/dbus
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-01-25 17:56:33 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-01-25 17:56:33 (GMT)
commit5422e929cad04633a06c156cba96cfcd69262522 (patch)
treeafb3c9b76c05d80238a1ff76f4e8f4019fac1651 /src/dbus
parentac798c5d77c59ea8dfe29c9d1896fb6604e3a628 (diff)
parenta0e0a9378d10db9c8ab3ba4d59f5c576ee4cbc40 (diff)
downloadQt-5422e929cad04633a06c156cba96cfcd69262522.zip
Qt-5422e929cad04633a06c156cba96cfcd69262522.tar.gz
Qt-5422e929cad04633a06c156cba96cfcd69262522.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: configure src/network/bearer/bearer.pri
Diffstat (limited to 'src/dbus')
-rw-r--r--src/dbus/qdbusconnection.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp
index eb312d2..3fb63eb 100644
--- a/src/dbus/qdbusconnection.cpp
+++ b/src/dbus/qdbusconnection.cpp
@@ -632,10 +632,26 @@ bool QDBusConnection::connect(const QString &service, const QString &path, const
if (!receiver || !slot || !d || !d->connection)
return false;
- if (!interface.isEmpty() && !QDBusUtil::isValidInterfaceName(interface))
- return false;
if (interface.isEmpty() && name.isEmpty())
return false;
+ if (!interface.isEmpty() && !QDBusUtil::isValidInterfaceName(interface)) {
+#ifndef QT_NO_DEBUG
+ qWarning("QDBusConnection::connect: interface name '%s' is not valid", interface.toLatin1().constData());
+#endif
+ return false;
+ }
+ if (!service.isEmpty() && !QDBusUtil::isValidBusName(service)) {
+#ifndef QT_NO_DEBUG
+ qWarning("QDBusConnection::connect: service name '%s' is not valid", service.toLatin1().constData());
+#endif
+ return false;
+ }
+ if (!path.isEmpty() && !QDBusUtil::isValidObjectPath(path)) {
+#ifndef QT_NO_DEBUG
+ qWarning("QDBusConnection::connect: object path '%s' is not valid", path.toLatin1().constData());
+#endif
+ return false;
+ }
QDBusWriteLocker locker(ConnectAction, d);
return d->connectSignal(service, path, interface, name, argumentMatch, signature, receiver, slot);