diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-09-10 09:24:07 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-09-10 09:24:07 -0500 |
commit | 8bf5213c84d2fc68e2a22e3222ed8c82ae973550 (patch) | |
tree | f4f34f153fa915fbcf630a6c162b9c034003f3bb /src/tools | |
parent | 2c0153b9c2fe30289074a29f2cd0f75276219403 (diff) | |
download | tqt3-8bf5213c84d2fc68e2a22e3222ed8c82ae973550.tar.gz tqt3-8bf5213c84d2fc68e2a22e3222ed8c82ae973550.zip |
Automated update from Qt3
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/quuid.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tools/quuid.cpp b/src/tools/quuid.cpp index 36472176a..11468a7ec 100644 --- a/src/tools/quuid.cpp +++ b/src/tools/quuid.cpp @@ -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 |