summaryrefslogtreecommitdiffabout
path: root/microkde/kapplication.cpp
Unidiff
Diffstat (limited to 'microkde/kapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kapplication.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp
index a1d00a8..77ceac5 100644
--- a/microkde/kapplication.cpp
+++ b/microkde/kapplication.cpp
@@ -1,26 +1,31 @@
1#include <stdlib.h> 1#include <stdlib.h>
2 2
3#include "kapplication.h" 3#include "kapplication.h"
4 4
5int KApplication::random() 5int KApplication::random()
6{ 6{
7 return rand(); 7 return rand();
8} 8}
9 9
10//US 10//US
11QString KApplication::randomString(int length) 11QString KApplication::randomString(int length)
12{ 12{
13 if (length <=0 ) return QString::null; 13 if (length <=0 ) return QString::null;
14 14
15 QString str; 15 QString str;
16 while (length--) 16 while (length--)
17 { 17 {
18 int r=random() % 62; 18 int r=random() % 62;
19 r+=48; 19 r+=48;
20 if (r>57) r+=7; 20 if (r>57) r+=7;
21 if (r>90) r+=6; 21 if (r>90) r+=6;
22 str += char(r); 22 str += char(r);
23 // so what if I work backwards? 23 // so what if I work backwards?
24 } 24 }
25 return str; 25 return str;
26} 26}
27 int KApplication::execDialog( QDialog* d )
28{
29 d->showMaximized();
30 return d->exec();
31}