summaryrefslogtreecommitdiff
path: root/core/qws/transferserver.cpp
Unidiff
Diffstat (limited to 'core/qws/transferserver.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/qws/transferserver.cpp31
1 files changed, 25 insertions, 6 deletions
diff --git a/core/qws/transferserver.cpp b/core/qws/transferserver.cpp
index 0337a94..239c824 100644
--- a/core/qws/transferserver.cpp
+++ b/core/qws/transferserver.cpp
@@ -25,3 +25,6 @@
25#include <time.h> 25#include <time.h>
26
27#ifndef Q_OS_MACX
26#include <shadow.h> 28#include <shadow.h>
29#endif /* Q_OS_MACX */
27 30
@@ -31,2 +34,7 @@
31#ifndef _OS_LINUX_ 34#ifndef _OS_LINUX_
35// Is anybody able to review this ? The include "uuid/uuid.h" couldn't be found
36// anywhere ? Therfore I removed it completely..
37// I think it should be made permanentyl !? (eilers)
38#warning "Where should uuid/uuid.h be found ? Removed this part .. (eilers)"
39#if 0
32 40
@@ -38,2 +46,4 @@ extern "C"
38 46
47#endif
48
39#endif // not defined linux 49#endif // not defined linux
@@ -42,2 +52,4 @@ extern "C"
42#include <shadow.h> 52#include <shadow.h>
53#elif defined(Q_OS_MACX)
54#include <stdlib.h>
43#endif 55#endif
@@ -93,11 +105,11 @@ struct UidGen
93}; 105};
94#if !defined(_OS_LINUX_) 106#if defined(Q_OS_MACX)
95
96QString UidGen::uuid() 107QString UidGen::uuid()
97{ 108{
98 uuid_t uuid; 109 srandom( random() );
99 uuid_generate( uuid ); 110 QString numStr = QString::number( random() );
100 return QUUid( uuid ).toString(); 111
112 return "{" + numStr + "}";
101} 113}
102#else 114#elif defined(_OS_LINUX_)
103/* 115/*
@@ -116,2 +128,9 @@ QString UidGen::uuid()
116} 128}
129#else
130QString UidGen::uuid()
131{
132 uuid_t uuid;
133 ::uuid_generate( uuid );
134 return QUUid( uuid ).toString();
135}
117#endif 136#endif