diff options
author | Martin Smith <martin.smith@qt.io> | 2018-09-28 10:25:36 +0200 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2018-10-16 15:55:26 +0000 |
commit | 0014d81b1907621ea567ee157fc85113744a6af2 (patch) | |
tree | 5e5c4721c6c8e2e19a8b2a83a436f9aa5fb740b2 /src/corelib/serialization/qcborvalue.cpp | |
parent | 5ab94518461328212b4c461532a0757231187ac8 (diff) |
doc: Revert to documenting the actual functions
A few member functions of QCborValue and QCborValueRef were given special
declarations for qdoc to see so that they could be documented as a single
function, but because clang is now used to parse c++, the special declarations
caused parsing errors.
The declarations for qdoc are removed in this update, but the functions are
still documented with a single comment by grouping the \fn commands for the
similar functions together in the single comment.
Change-Id: If97ee2f2bfcd045d2259a4375b31b8884eeb1072
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
Diffstat (limited to 'src/corelib/serialization/qcborvalue.cpp')
-rw-r--r-- | src/corelib/serialization/qcborvalue.cpp | 50 |
1 files changed, 42 insertions, 8 deletions
diff --git a/src/corelib/serialization/qcborvalue.cpp b/src/corelib/serialization/qcborvalue.cpp index 935f761585..73ac3125e4 100644 --- a/src/corelib/serialization/qcborvalue.cpp +++ b/src/corelib/serialization/qcborvalue.cpp @@ -1990,12 +1990,24 @@ QUuid QCborValue::toUuid(const QUuid &defaultValue) const return QUuid::fromRfc4122(byteData->asByteArrayView()); } -QCborArray QCborValue::toArray() const -{ - return toArray(QCborArray()); -} +/*! + \fn QCborArray QCborValue::toArray() const + \fn QCborArray QCborValue::toArray(const QCborArray &defaultValue) const + + Returns the array value stored in this QCborValue, if it is of the array + type. Otherwise, it returns \a defaultValue. + + Note that this function performs no conversion from other types to + QCborArray. + + \sa isArray(), isByteArray(), isMap(), isContainer(), toMap() + */ /*! + \fn QCborArray QCborValueRef::toArray() const + \fn QCborArray QCborValueRef::toArray(const QCborArray &defaultValue) const + \internal + Returns the array value stored in this QCborValue, if it is of the array type. Otherwise, it returns \a defaultValue. @@ -2004,6 +2016,11 @@ QCborArray QCborValue::toArray() const \sa isArray(), isByteArray(), isMap(), isContainer(), toMap() */ +QCborArray QCborValue::toArray() const +{ + return toArray(QCborArray()); +} + QCborArray QCborValue::toArray(const QCborArray &defaultValue) const { if (!isArray()) @@ -2015,12 +2032,24 @@ QCborArray QCborValue::toArray(const QCborArray &defaultValue) const return dd ? QCborArray(*dd) : defaultValue; } -QCborMap QCborValue::toMap() const -{ - return toMap(QCborMap()); -} +/*! + \fn QCborMap QCborValue::toMap() const + \fn QCborMap QCborValue::toMap(const QCborMap &defaultValue) const + + Returns the map value stored in this QCborValue, if it is of the map type. + Otherwise, it returns \a defaultValue. + + Note that this function performs no conversion from other types to + QCborMap. + + \sa isMap(), isArray(), isContainer(), toArray() + */ /*! + \fn QCborMap QCborValueRef::toMap() const + \fn QCborMap QCborValueRef::toMap(const QCborMap &defaultValue) const + \internal + Returns the map value stored in this QCborValue, if it is of the map type. Otherwise, it returns \a defaultValue. @@ -2029,6 +2058,11 @@ QCborMap QCborValue::toMap() const \sa isMap(), isArray(), isContainer(), toArray() */ +QCborMap QCborValue::toMap() const +{ + return toMap(QCborMap()); +} + QCborMap QCborValue::toMap(const QCborMap &defaultValue) const { if (!isMap()) |