Skip to content

Commit

Permalink
Applay fix from master using Qt's QUuid class
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jan 2, 2013
1 parent b77b59f commit a7e2d50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Base/PreCompiled.h
Expand Up @@ -114,6 +114,7 @@
#include <QReadWriteLock>
#include <QMutex>
#include <QMutexLocker>
#include <QUuid>


#endif //_PreComp_
Expand Down
8 changes: 8 additions & 0 deletions src/Base/Uuid.cpp
Expand Up @@ -26,6 +26,8 @@
#ifndef _PreComp_
# ifdef FC_OS_WIN32
# include <Rpc.h>
# else
# include <QUuid>
# endif
#endif

Expand Down Expand Up @@ -82,6 +84,12 @@ std::string Uuid::CreateUuid(void)
/* convert it from rcp memory to our own */
//container = nssUTF8_Duplicate(uuidStr, NULL);
RpcStringFree(&uuidStr);
#elif 1
std::string Uuid;
QString uuid = QUuid::createUuid().toString();
uuid = uuid.mid(1);
uuid.chop(1);
Uuid = (const char*)uuid.toAscii();
#else
// use Python's implemententation
std::string Uuid;
Expand Down

0 comments on commit a7e2d50

Please sign in to comment.