7#include <QtCore/qendian.h>
8#include <QtCore/qstring.h>
10#if defined(Q_OS_WIN) || defined(Q_QDOC)
19} GUID, *REFGUID, *LPGUID;
23#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
63#ifdef __SIZEOF_INT128__
77 : data1(l), data2(
w1), data3(
w2), data4{b1, b2, b3, b4, b5, b6, b7, b8} {}
83#if QT_CORE_REMOVED_SINCE(6, 3)
87 explicit QUuid(
const char *);
96#if QT_CORE_REMOVED_SINCE(6, 3)
101 bool isNull() const noexcept;
103#ifdef __SIZEOF_INT128__
110 if (data1 != orig.data1 || data2 != orig.data2 ||
115 if (data4[
i] != orig.data4[
i])
123 return !(*
this == orig);
129#if defined(Q_OS_WIN) || defined(Q_QDOC)
132 constexpr QUuid(
const GUID &guid) noexcept
133 : data1(guid.Data1), data2(guid.Data2), data3(guid.Data3),
134 data4{guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3],
135 guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]} {}
137 constexpr QUuid &operator=(
const GUID &guid)
noexcept
143 constexpr operator GUID() const noexcept
145 GUID guid = { data1, data2, data3, { data4[0], data4[1], data4[2], data4[3], data4[4], data4[5], data4[6], data4[7] } };
149 constexpr bool operator==(
const GUID &guid)
const noexcept
151 return *
this ==
QUuid(guid);
154 constexpr bool operator!=(
const GUID &guid)
const noexcept
156 return !(*
this == guid);
159 static QUuid createUuid();
160#ifndef QT_BOOTSTRAPPED
164#ifndef QT_BOOTSTRAPPED
179#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
180 static QUuid fromCFUUID(CFUUIDRef uuid);
182 static
QUuid fromNSUUID(const NSUUID *uuid);
192 static constexpr Id128Bytes bswap(Id128Bytes
b)
205#ifndef QT_NO_DATASTREAM
210#ifndef QT_NO_DEBUG_STREAM
220 data1 = qFromBigEndian<quint32>(&uuid.data[0]);
221 data2 = qFromBigEndian<quint16>(&uuid.data[4]);
222 data3 = qFromBigEndian<quint16>(&uuid.data[6]);
223 memcpy(data4, &uuid.data[8],
sizeof(data4));
232 memcpy(&
result.data[8], data4,
sizeof(data4));
245#ifdef __SIZEOF_INT128__
250 data1 =
uint(uuid >> 96);
251 data2 =
ushort(uuid >> 80);
252 data3 =
ushort(uuid >> 64);
253 for (
int i = 0;
i < 8; ++
i)
254 data4[
i] =
uchar(uuid >> (56 -
i * 8));
264 for (
int i = 0;
i < 8; ++
i)
273{
return !(rhs < lhs); }
275{
return !(lhs < rhs); }
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
QByteArray toUtf8() const &
Endian
\value BigEndian Big-endian byte order (also called Network byte order) \value LittleEndian Little-en...
static QUuid createUuidV3(const QUuid &ns, const QString &baseData)
constexpr bool operator!=(const QUuid &orig) const noexcept
Returns true if this QUuid and the other QUuid are different; otherwise returns false.
Version
This enum defines the values used in the \l{Version field} {version field} of the UUID.
Variant
This enum defines the values used in the \l{Variant field} {variant field} of the UUID.
constexpr QUuid(uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8) noexcept
Creates a UUID with the value specified by the parameters, l, w1, w2, b1, b2, b3, b4,...
QUuid(QAnyStringView string) noexcept
Creates a QUuid object from the string text, which must be formatted as five hex fields separated by ...
static QUuid createUuidV5(const QUuid &ns, const QByteArray &baseData)
Id128Bytes toBytes(QSysInfo::Endian order=QSysInfo::BigEndian) const noexcept
static QUuid createUuidV3(const QUuid &ns, const QByteArray &baseData)
static QUuid createUuidV5(const QUuid &ns, const QString &baseData)
static QUuid fromBytes(const void *bytes, QSysInfo::Endian order=QSysInfo::BigEndian) noexcept
constexpr bool operator==(const QUuid &orig) const noexcept
Returns true if this QUuid and the other QUuid are identical; otherwise returns false.
constexpr QUuid() noexcept
Creates the null UUID.
std::list< QString >::iterator Name
Combined button and popup list for selecting options.
void toByteArray(QByteArray &)
#define Q_DECL_NS_RETURNS_AUTORELEASED
#define Q_DECL_CF_RETURNS_RETAINED
constexpr bool operator!=(const timespec &t1, const timespec &t2)
#define Q_FORWARD_DECLARE_CF_TYPE(type)
#define Q_FORWARD_DECLARE_OBJC_CLASS(classname)
constexpr T qbswap(T source)
constexpr T qToBigEndian(T source)
GLboolean GLboolean GLboolean b
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint GLdouble GLdouble w2
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint GLdouble w1
GLfixed GLfixed GLint GLint order
bool operator>(const QPoint &a, const QPoint &b)
static bool fromString(const QMetaObject *mo, QString s, Allocate &&allocate)
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
static bool operator<(const QSettingsIniKey &k1, const QSettingsIniKey &k2)
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
unsigned long long quint64
Q_CORE_EXPORT QDataStream & operator<<(QDataStream &, const QUuid &)
Q_CORE_EXPORT QDataStream & operator>>(QDataStream &, QUuid &)
bool operator<=(const QUuid &lhs, const QUuid &rhs) noexcept
Q_CORE_EXPORT size_t qHash(const QUuid &uuid, size_t seed=0) noexcept
bool operator>=(const QUuid &lhs, const QUuid &rhs) noexcept
char * toString(const MyType &t)
[31]