diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-06-30 09:13:47 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-02 09:43:31 (GMT) |
commit | e7ca74ed8a41eb4c05f436007417d160b6cf94f7 (patch) | |
tree | 458d268e0bd3019a346caad43a731e5a7203757a /src/dbus/qdbusmessage.h | |
parent | 8d4657764b0c4362dc25aa79a6e2853b8c98f0ad (diff) | |
download | Qt-e7ca74ed8a41eb4c05f436007417d160b6cf94f7.zip Qt-e7ca74ed8a41eb4c05f436007417d160b6cf94f7.tar.gz Qt-e7ca74ed8a41eb4c05f436007417d160b6cf94f7.tar.bz2 |
Avoid revalidating message parameters.
This is a small performance improvement when making a call: we don't
need to validate what we already know to be valid because we either
designed it to be so or because we've already validated.
The D-Bus library unfortunately validates again and there's nothing we
can do about it. But we can avoid doing it twice in our own code.
Reviewed-By: Marius Bugge Monsen
Diffstat (limited to 'src/dbus/qdbusmessage.h')
-rw-r--r-- | src/dbus/qdbusmessage.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/dbus/qdbusmessage.h b/src/dbus/qdbusmessage.h index 55f388a..34b1635 100644 --- a/src/dbus/qdbusmessage.h +++ b/src/dbus/qdbusmessage.h @@ -87,8 +87,9 @@ public: QDBusMessage createErrorReply(const QString name, const QString &msg) const; inline QDBusMessage createErrorReply(const QDBusError &err) const { return createErrorReply(err.name(), err.message()); } - inline QDBusMessage createErrorReply(QDBusError::ErrorType type, const QString &msg) const; + QDBusMessage createErrorReply(QDBusError::ErrorType type, const QString &msg) const; + // there are no setters; if this changes, see qdbusmessage_p.h QString service() const; QString path() const; QString interface() const; @@ -113,9 +114,6 @@ private: QDBusMessagePrivate *d_ptr; }; -inline QDBusMessage QDBusMessage::createErrorReply(QDBusError::ErrorType atype, const QString &amsg) const -{ return createErrorReply(QDBusError::errorString(atype), amsg); } - #ifndef QT_NO_DEBUG_STREAM QDBUS_EXPORT QDebug operator<<(QDebug, const QDBusMessage &); #endif |