summaryrefslogtreecommitdiffabout
path: root/microkde
Unidiff
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kapplication.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp
index 539397b..566bb41 100644
--- a/microkde/kapplication.cpp
+++ b/microkde/kapplication.cpp
@@ -1,44 +1,45 @@
1#include <stdlib.h> 1#include <stdlib.h>
2#include <stdio.h> 2#include <stdio.h>
3 3
4#include "kapplication.h" 4#include "kapplication.h"
5#include "ktextedit.h" 5#include "ktextedit.h"
6#include <qapplication.h> 6#include <qapplication.h>
7#include <qstring.h> 7#include <qstring.h>
8#include <qfile.h> 8#include <qfile.h>
9#include <qtextstream.h> 9#include <qtextstream.h>
10#include <qdialog.h> 10#include <qdialog.h>
11#include <qlayout.h> 11#include <qlayout.h>
12#include <qtextbrowser.h> 12#include <qtextbrowser.h>
13#include <qregexp.h>
13 14
14int KApplication::random() 15int KApplication::random()
15{ 16{
16 return rand(); 17 return rand();
17} 18}
18 19
19//US 20//US
20QString KApplication::randomString(int length) 21QString KApplication::randomString(int length)
21{ 22{
22 if (length <=0 ) return QString::null; 23 if (length <=0 ) return QString::null;
23 24
24 QString str; 25 QString str;
25 while (length--) 26 while (length--)
26 { 27 {
27 int r=random() % 62; 28 int r=random() % 62;
28 r+=48; 29 r+=48;
29 if (r>57) r+=7; 30 if (r>57) r+=7;
30 if (r>90) r+=6; 31 if (r>90) r+=6;
31 str += char(r); 32 str += char(r);
32 // so what if I work backwards? 33 // so what if I work backwards?
33 } 34 }
34 return str; 35 return str;
35} 36}
36int KApplication::execDialog( QDialog* d ) 37int KApplication::execDialog( QDialog* d )
37{ 38{
38 if (QApplication::desktop()->width() <= 640 ) 39 if (QApplication::desktop()->width() <= 640 )
39 d->showMaximized(); 40 d->showMaximized();
40 else 41 else
41 ;//d->resize( 800, 600 ); 42 ;//d->resize( 800, 600 );
42 return d->exec(); 43 return d->exec();
43} 44}
44void KApplication::showLicence() 45void KApplication::showLicence()