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