author | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
commit | b9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (side-by-side diff) | |
tree | 2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /microkde/kapplication.cpp | |
download | kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2 |
Initial revision
-rw-r--r-- | microkde/kapplication.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp new file mode 100644 index 0000000..a1d00a8 --- a/dev/null +++ b/microkde/kapplication.cpp @@ -0,0 +1,26 @@ +#include <stdlib.h> + +#include "kapplication.h" + +int KApplication::random() +{ + return rand(); +} + +//US +QString KApplication::randomString(int length) +{ + if (length <=0 ) return QString::null; + + QString str; + while (length--) + { + int r=random() % 62; + r+=48; + if (r>57) r+=7; + if (r>90) r+=6; + str += char(r); + // so what if I work backwards? + } + return str; +} |