diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-04-10 12:48:01 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-04-10 15:31:45 +0200 |
commit | 143c4d3e13a430b951f4f4f8c28db14303f80605 (patch) | |
tree | 2b89637b93fc7d81c674106008566010f986d67c /src/corelib/plugin/quuid.h | |
parent | a7ed81b557d593a8ddb43b71bf4bbf3b44ead070 (diff) | |
parent | e5337ad1b1fb02873ce7b5ca8db45f6fd8063352 (diff) |
Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
configure
src/widgets/styles/qwindowsxpstyle.cpp
tests/auto/gui/kernel/qwindow/qwindow.pro
tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
Diffstat (limited to 'src/corelib/plugin/quuid.h')
-rw-r--r-- | src/corelib/plugin/quuid.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/corelib/plugin/quuid.h b/src/corelib/plugin/quuid.h index 0538b93c36..e595613e8f 100644 --- a/src/corelib/plugin/quuid.h +++ b/src/corelib/plugin/quuid.h @@ -84,6 +84,13 @@ 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} {} + + 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() { data1 = 0; @@ -106,6 +113,8 @@ public: data4[6] = b7; data4[7] = b8; } +#endif + #ifndef QT_NO_QUUID_STRING QUuid(const QString &); QUuid(const char *); @@ -142,6 +151,12 @@ 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 + 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], + guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]} {} +#else QUuid(const GUID &guid) { data1 = guid.Data1; @@ -150,6 +165,7 @@ public: for(int i = 0; i < 8; i++) data4[i] = guid.Data4[i]; } +#endif QUuid &operator=(const GUID &guid) { |