diff options
author | Darrell Anderson <[email protected]> | 2012-09-14 17:50:55 -0500 |
---|---|---|
committer | Darrell Anderson <[email protected]> | 2012-09-14 17:50:55 -0500 |
commit | 9ea2e3d89314dd9a8494e33c4d435184aedce711 (patch) | |
tree | ef507816e1e3f0944dffb197c6a9c7da8a838fbc /src/tools | |
parent | 778e6b59651897a35d65e17cdd80bb7f398e8aa2 (diff) | |
parent | 4623775a226d3d21dac6fee77fcaa9bfa477e6b8 (diff) | |
download | tqt3-9ea2e3d89314dd9a8494e33c4d435184aedce711.tar.gz tqt3-9ea2e3d89314dd9a8494e33c4d435184aedce711.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tqt3
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 |