author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook/mainembedded.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'kaddressbook/mainembedded.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/mainembedded.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index 2f3531d..e373105 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp | |||
@@ -1,48 +1,47 @@ | |||
1 | #ifndef DESKTOP_VERSION | 1 | #ifndef DESKTOP_VERSION |
2 | #include <qpe/qpeapplication.h> | 2 | #include <qpe/qpeapplication.h> |
3 | #include <qcopchannel_qws.h> | 3 | #include <qcopchannel_qws.h> |
4 | #include <stdlib.h> | 4 | #include <stdlib.h> |
5 | #else | 5 | #else |
6 | #include <qapplication.h> | 6 | #include <qapplication.h> |
7 | #include <qwindowsstyle.h> | 7 | #include <qwindowsstyle.h> |
8 | #include <qplatinumstyle.h> | 8 | #include <q3mainwindow.h> |
9 | #include <qmainwindow.h> | ||
10 | #include <qmessagebox.h> | 9 | #include <qmessagebox.h> |
11 | #include <stdlib.h> | 10 | #include <stdlib.h> |
12 | #endif | 11 | #endif |
13 | 12 | ||
14 | #include <qtextcodec.h> | 13 | #include <qtextcodec.h> |
15 | #include <kstandarddirs.h> | 14 | #include <kstandarddirs.h> |
16 | #include <qregexp.h> | 15 | #include <qregexp.h> |
17 | #include <kglobal.h> | 16 | #include <kglobal.h> |
18 | #include <stdio.h> | 17 | #include <stdio.h> |
19 | #include <qdir.h> | 18 | #include <qdir.h> |
20 | #include "kabprefs.h" | 19 | #include "kabprefs.h" |
21 | #include "kaddressbookmain.h" | 20 | #include "kaddressbookmain.h" |
22 | #include "externalapphandler.h" | 21 | #include "externalapphandler.h" |
23 | #include <libkdepim/kpimglobalprefs.h> | 22 | #include <libkdepim/kpimglobalprefs.h> |
24 | void dumpMissing(); | 23 | void dumpMissing(); |
25 | int main( int argc, char **argv ) | 24 | int main( int argc, char **argv ) |
26 | { | 25 | { |
26 | if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); | ||
27 | #ifndef DESKTOP_VERSION | 27 | #ifndef DESKTOP_VERSION |
28 | QPEApplication a( argc, argv ); | 28 | QPEApplication a( argc, argv ); |
29 | a.setKeepRunning (); | 29 | a.setKeepRunning (); |
30 | #else | 30 | #else |
31 | QApplication a( argc, argv ); | 31 | QApplication a( argc, argv ); |
32 | QApplication::setStyle( new QPlatinumStyle ()); | ||
33 | #ifdef _WIN32_ | 32 | #ifdef _WIN32_ |
34 | QString hdir ( getenv( "HOME") ); | 33 | QString hdir ( getenv( "HOME") ); |
35 | if ( hdir.isEmpty() ) { | 34 | if ( hdir.isEmpty() ) { |
36 | QString hd ("C:/" ); | 35 | QString hd ("C:/" ); |
37 | //QMessageBox::information(0,"hh",QDir::homeDirPath()+" xx" +hd ); | 36 | //QMessageBox::information(0,"hh",QDir::homeDirPath()+" xx" +hd ); |
38 | if ( QDir::homeDirPath().lower() == hd.lower() ) { | 37 | if ( QDir::homeDirPath().lower() == hd.lower() ) { |
39 | _putenv( "HOME=C:"); | 38 | _putenv( "HOME=C:"); |
40 | //QMessageBox::information(0,"hh",QString ( getenv( "HOME") ) ); | 39 | //QMessageBox::information(0,"hh",QString ( getenv( "HOME") ) ); |
41 | } | 40 | } |
42 | } else { | 41 | } else { |
43 | QDir app_dir; | 42 | QDir app_dir; |
44 | if ( !app_dir.exists(hdir) ) | 43 | if ( !app_dir.exists(hdir) ) |
45 | app_dir.mkdir (hdir); | 44 | app_dir.mkdir (hdir); |
46 | } | 45 | } |
47 | #endif | 46 | #endif |
48 | #endif | 47 | #endif |