|
|
|
@ -389,6 +389,18 @@ TQUuid TQUuid::createUuid()
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
#else // !Q_OS_WIN32
|
|
|
|
|
#if defined(Q_OS_LINUX)
|
|
|
|
|
#include <uuid/uuid.h>
|
|
|
|
|
TQUuid TQUuid::createUuid()
|
|
|
|
|
{
|
|
|
|
|
uuid_t raw_uuid;
|
|
|
|
|
char uuid_string[37];
|
|
|
|
|
|
|
|
|
|
uuid_generate(raw_uuid);
|
|
|
|
|
uuid_unparse(raw_uuid, uuid_string);
|
|
|
|
|
return TQUuid(uuid_string);
|
|
|
|
|
}
|
|
|
|
|
#else // !Q_OS_LINUX
|
|
|
|
|
#include "ntqdatetime.h"
|
|
|
|
|
#include "stdlib.h" // For srand/rand
|
|
|
|
|
TQUuid TQUuid::createUuid()
|
|
|
|
@ -417,5 +429,6 @@ TQUuid TQUuid::createUuid()
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
#endif // !Q_OS_LINUX
|
|
|
|
|
#endif // !Q_OS_WIN32
|
|
|
|
|
|
|
|
|
|