summaryrefslogtreecommitdiffabout
path: root/microkde/kapplication.cpp
blob: 77ceac533db5cd2cb39c7e15a33ec4a20c6c9555 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#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;
}
 int KApplication::execDialog( QDialog* d )
{
    d->showMaximized();
    return d->exec();
}