diff options
author | Jędrzej Nowacki <jedrzej.nowacki@nokia.com> | 2011-11-17 13:42:48 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-10 03:55:55 (GMT) |
commit | af268af523c3d72fc1b0b573dea6f29e2b3119f6 (patch) | |
tree | 9f4dfc9159d32f705a56c923b747b8801ddc2c14 /src | |
parent | fec87547a80e66aa3f38d3c047f56a76050b9296 (diff) | |
download | Qt-af268af523c3d72fc1b0b573dea6f29e2b3119f6.zip Qt-af268af523c3d72fc1b0b573dea6f29e2b3119f6.tar.gz Qt-af268af523c3d72fc1b0b573dea6f29e2b3119f6.tar.bz2 |
Fix clang warning about bool to pointer conversion.
The operation is legal from C++ perspective but only for "false" as it
is guaranteed to be 0. Anyway returning 0 instead of "false" is
logical and it follows coding style used in the modified functions.
(cherry-picked from qt5 commit 50995e6936c5ca75a0a8a48c29bbbedd2cc60567)
Change-Id: Ia09758e8d28599097f5c40eb24722890508afdbc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/dbus/qdbusconnection.cpp | 2 | ||||
-rw-r--r-- | src/dbus/qdbusutil.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp index 5c133e3..bb03c00 100644 --- a/src/dbus/qdbusconnection.cpp +++ b/src/dbus/qdbusconnection.cpp @@ -937,7 +937,7 @@ QObject *QDBusConnection::objectRegisteredAt(const QString &path) const Q_ASSERT_X(QDBusUtil::isValidObjectPath(path), "QDBusConnection::registeredObject", "Invalid object path given"); if (!d || !d->connection || !QDBusUtil::isValidObjectPath(path)) - return false; + return 0; QStringList pathComponents = path.split(QLatin1Char('/')); if (pathComponents.last().isEmpty()) diff --git a/src/dbus/qdbusutil.cpp b/src/dbus/qdbusutil.cpp index 0ad02ae..4e883c3 100644 --- a/src/dbus/qdbusutil.cpp +++ b/src/dbus/qdbusutil.cpp @@ -259,7 +259,7 @@ static const char *validateSingleType(const char *signature) { register char c = *signature; if (c == DBUS_TYPE_INVALID) - return false; + return 0; // is it one of the one-letter types? if (strchr(oneLetterTypes, c) != NULL) |