[Uml-devel] KDE/kdesdk/umbrello/umbrello

Dirk Mueller mueller at kde.org
Thu Nov 16 21:21:17 UTC 2006


SVN commit 605474 by mueller:

things you have to do when you start coding on a new project (in no
particular order):
- write your own string class
- write your own pseudo number generator
- write your own I/O abstraction layer


 M  +0 -1      CMakeLists.txt  
 M  +4 -8      uniqueid.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/CMakeLists.txt #605473:605474
@@ -302,7 +302,6 @@
 
 FIND_LIBRARY(LIBXSLT NAMES xslt PATHS /usr/lib /usr/local/lib)
 FIND_LIBRARY(LIBXML2 NAMES xml2 PATHS /usr/lib /usr/local/lib)
-FIND_LIBRARY(LIBUUID NAMES uuid PATHS /usr/lib /usr/local/lib)
 
 target_link_libraries(umbrello  ${KDE4_KIO_LIBS}  ${KDE4_KDEPRINT_LIBS} ${KDE4_KDE3SUPPORT_LIBS} ${LIBXML2} ${LIBXSLT} ${LIBUUID})
 
--- trunk/KDE/kdesdk/umbrello/umbrello/uniqueid.cpp #605473:605474
@@ -11,23 +11,19 @@
 
 // own header
 #include "uniqueid.h"
+#include <krandom.h>
 
-// system includes
-#include <uuid/uuid.h>
-
 namespace UniqueID {
 
+
+
 /**
  * Each model object gets assigned a unique ID.
  */
 Uml::IDType m_uniqueID;
 
 Uml::IDType gen() {
-    static char buf[40];
-    uuid_t uuid;
-    uuid_generate(uuid);
-    uuid_unparse_upper(uuid, buf);
-    m_uniqueID = std::string(buf);
+    m_uniqueID = std::string(KRandom::randomString(40).toLatin1());
     return m_uniqueID;
 }
 




More information about the umbrello-devel mailing list