qdoc: Use Q_QDOC in quuid.h to help qdoc

Some new ctor initializers were added that use
curly braces. qdoc's dumb C++ parser can't handle
curly braces in the ctor area; it thinks they are
the body of the function. In this update, the
Q_QDOC macro is used to isolate these problems
so qdoc doesn't have to deal with them.

Task-number: QTBUG-30254
Change-Id: Ie318e4ac58861f4ebd8a7b9f004d2677f850436e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
Martin Smith 2013-03-25 13:05:09 +01:00 committed by The Qt Project
parent 7dc622290b
commit 15fca980e9

View File

@ -82,11 +82,11 @@ public:
Sha1 = 5 // 0 1 0 1
};
#ifdef Q_COMPILER_INITIALIZER_LISTS // UNIFORM_INITIALIZATION
Q_DECL_CONSTEXPR QUuid()
: data1(0), data2(0), data3(0), data4{0,0,0,0,0,0,0,0} {}
#if defined(Q_COMPILER_INITIALIZER_LISTS) && !defined(Q_QDOC)
Q_DECL_CONSTEXPR QUuid() : data1(0), data2(0), data3(0), data4{0,0,0,0,0,0,0,0} {}
Q_DECL_CONSTEXPR QUuid(uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8)
Q_DECL_CONSTEXPR QUuid(uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3,
uchar b4, uchar b5, uchar b6, uchar b7, uchar b8)
: data1(l), data2(w1), data3(w2), data4{b1, b2, b3, b4, b5, b6, b7, b8} {}
#else
QUuid()
@ -147,7 +147,7 @@ public:
#if defined(Q_OS_WIN)
// On Windows we have a type GUID that is used by the platform API, so we
// provide convenience operators to cast from and to this type.
#ifdef Q_COMPILER_INITIALIZER_LISTS // UNIFORM_INITIALIZATION
#if defined(Q_COMPILER_INITIALIZER_LISTS) && !defined(Q_QDOC)
Q_DECL_CONSTEXPR QUuid(const GUID &guid)
: data1(guid.Data1), data2(guid.Data2), data3(guid.Data3),
data4{guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3],