From a942721edc9670fb9a66f952c23387c32de3c2f8 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 9 Dec 2016 10:19:40 +0100 Subject: doc: update dbus sources for clangqdoc Changed some uses of Q_QDOC to Q_CLANG_QDOC; eliminated some uses of Q_QDOC; correct some function signatures used for qdoc; added docs for swap() functions. Change-Id: I0d3c62d462bd3b10fd35d411bdfb93d952e6423d Reviewed-by: Martin Smith --- src/dbus/qdbusargument.cpp | 6 ++++++ src/dbus/qdbusconnection.cpp | 6 ++++++ src/dbus/qdbuserror.cpp | 6 ++++++ src/dbus/qdbusextratypes.cpp | 18 ++++++++++++++++++ src/dbus/qdbusmessage.cpp | 16 ++++++---------- src/dbus/qdbuspendingcall.cpp | 2 +- src/dbus/qdbuspendingreply.h | 23 +++++++++++------------ 7 files changed, 54 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/dbus/qdbusargument.cpp b/src/dbus/qdbusargument.cpp index df2817ca77..d7f9dcc718 100644 --- a/src/dbus/qdbusargument.cpp +++ b/src/dbus/qdbusargument.cpp @@ -1374,6 +1374,12 @@ QDBusArgument &operator<<(QDBusArgument &a, const QLineF &line) } #endif +/*! + \fn void QDBusArgument::swap(QDBusArgument &other) + + Swaps this QDBusArgument instance with \a other. +*/ + QT_END_NAMESPACE #endif // QT_NO_DBUS diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp index c95f195aca..2c2dfc1ff6 100644 --- a/src/dbus/qdbusconnection.cpp +++ b/src/dbus/qdbusconnection.cpp @@ -1272,6 +1272,12 @@ QByteArray QDBusConnection::localMachineId() When using BlockWithGui, applications must be prepared for reentrancy in any function. */ +/*! + \fn void QDBusConnection::swap(QDBusConnection &other) + + Swaps this QDBusConnection instance with \a other. +*/ + QT_END_NAMESPACE #ifdef Q_OS_WIN diff --git a/src/dbus/qdbuserror.cpp b/src/dbus/qdbuserror.cpp index c599df6a32..e966f9dcde 100644 --- a/src/dbus/qdbuserror.cpp +++ b/src/dbus/qdbuserror.cpp @@ -409,6 +409,12 @@ QDebug operator<<(QDebug dbg, const QDBusError &msg) } #endif +/*! + \fn void QDBusError::swap(QDBusError &other) + + Swaps this QDBusError instance with \a other. +*/ + QT_END_NAMESPACE #endif // QT_NO_DBUS diff --git a/src/dbus/qdbusextratypes.cpp b/src/dbus/qdbusextratypes.cpp index 964daac6d9..a0b121a1a3 100644 --- a/src/dbus/qdbusextratypes.cpp +++ b/src/dbus/qdbusextratypes.cpp @@ -218,6 +218,24 @@ void QDBusSignature::doCheck() \sa signature() */ +/*! + \fn void QDBusObjectPath::swap(QDBusObjectPath &other) + + Swaps this QDBusObjectPath instance with \a other. +*/ + +/*! + \fn void QDBusSignature::swap(QDBusSignature &other) + + Swaps this QDBusSignature instance with \a other. +*/ + +/*! + \fn void QDBusVariant::swap(QDBusVariant &other) + + Swaps this QDBusVariant instance with \a other. +*/ + QT_END_NAMESPACE #endif // QT_NO_DBUS diff --git a/src/dbus/qdbusmessage.cpp b/src/dbus/qdbusmessage.cpp index 28d832c7c2..ef827e82b0 100644 --- a/src/dbus/qdbusmessage.cpp +++ b/src/dbus/qdbusmessage.cpp @@ -777,16 +777,6 @@ QDBusMessage::MessageType QDBusMessage::type() const return InvalidMessage; } -/*! - Sends the message without waiting for a reply. This is suitable - for errors, signals, and return values as well as calls whose - return values are not necessary. - - Returns \c true if the message was queued successfully; - otherwise returns \c false. - - \sa QDBusConnection::send() -*/ #ifndef QT_NO_DEBUG_STREAM static QDebug operator<<(QDebug dbg, QDBusMessage::MessageType t) { @@ -839,6 +829,12 @@ QDebug operator<<(QDebug dbg, const QDBusMessage &msg) } #endif +/*! + \fn void QDBusMessage::swap(QDBusMessage &other) + + Swaps this QDBusMessage instance with \a other. +*/ + QT_END_NAMESPACE #endif // QT_NO_DBUS diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp index 6cc76946ac..bd6eb9eca3 100644 --- a/src/dbus/qdbuspendingcall.cpp +++ b/src/dbus/qdbuspendingcall.cpp @@ -414,7 +414,7 @@ QDBusMessage QDBusPendingCall::reply() const } #if 0 -/*! +/* Sets the slot \a member in object \a target to be called when the reply arrives. The slot's parameter list must match the reply message's arguments for it to be called. diff --git a/src/dbus/qdbuspendingreply.h b/src/dbus/qdbuspendingreply.h index da29894d15..4bf574e140 100644 --- a/src/dbus/qdbuspendingreply.h +++ b/src/dbus/qdbuspendingreply.h @@ -111,7 +111,7 @@ namespace QDBusPendingReplyTypes { template class QDBusPendingReply: -#ifdef Q_QDOC +#ifdef Q_CLANG_QDOC public QDBusPendingCall #else public QDBusPendingReplyData @@ -144,13 +144,21 @@ public: inline int count() const { return Count; } -#if defined(Q_QDOC) +#if defined(Q_CLANG_QDOC) QVariant argumentAt(int index) const; #else using QDBusPendingReplyData::argumentAt; #endif -#if defined(Q_QDOC) + template inline + const typename Select::Type argumentAt() const + { + Q_STATIC_ASSERT_X(Index >= 0 && Index < Count, "Index out of bounds"); + typedef typename Select::Type ResultType; + return qdbus_cast(argumentAt(Index), 0); + } + +#if defined(Q_CLANG_QDOC) bool isFinished() const; void waitForFinished(); @@ -159,18 +167,9 @@ public: QDBusError error() const; QDBusMessage reply() const; - template inline Type argumentAt() const; inline T1 value() const; inline operator T1() const; #else - template inline - const typename Select::Type argumentAt() const - { - Q_STATIC_ASSERT_X(Index >= 0 && Index < Count, "Index out of bounds"); - typedef typename Select::Type ResultType; - return qdbus_cast(argumentAt(Index), 0); - } - inline typename Select<0>::Type value() const { return argumentAt<0>(); -- cgit v1.2.3