summaryrefslogtreecommitdiffabout
path: root/kaddressbook/mainembedded.cpp
Unidiff
Diffstat (limited to 'kaddressbook/mainembedded.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/mainembedded.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index 1e03dba..d9968f3 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -8,4 +8,6 @@
8#include <qplatinumstyle.h> 8#include <qplatinumstyle.h>
9#include <qmainwindow.h> 9#include <qmainwindow.h>
10#include <qmessagebox.h>
11#include <stdlib.h>
10#endif 12#endif
11 13
@@ -29,20 +31,20 @@ int main( int argc, char **argv )
29 QApplication a( argc, argv ); 31 QApplication a( argc, argv );
30 QApplication::setStyle( new QPlatinumStyle ()); 32 QApplication::setStyle( new QPlatinumStyle ());
31 QString hdir = QDir::homeDirPath(); 33#ifdef _WIN32_
32 // there is a bug when creating dirs for WIN 98 34 QString hdir ( getenv( "HOME") );
33 // it is difficult to fix, because we have no WIN 98 runnung 35 if ( hdir.isEmpty() ) {
34 // such that we try it to create the dirs at startup here 36 QString hd ("C:/" );
35 if ( hdir == "C:\\" ) { // win 98 or ME 37 //QMessageBox::information(0,"hh",QDir::homeDirPath()+" xx" +hd );
36 QDir app_dir; 38 if ( QDir::homeDirPath().lower() == hd.lower() ) {
37 if ( !app_dir.exists("C:\\kdepim") ) 39 _putenv( "HOME=C:");
38 app_dir.mkdir ("C:\\kdepim"); 40 //QMessageBox::information(0,"hh",QString ( getenv( "HOME") ) );
39 if ( !app_dir.exists("C:\\kdepim\\apps") ) 41 }
40 app_dir.mkdir ("C:\\kdepim\\apps"); 42 } else {
41 if ( !app_dir.exists("C:\\kdepim\\config") ) 43 QDir app_dir;
42 app_dir.mkdir ("C:\\kdepim\\config"); 44 if ( !app_dir.exists(hdir) )
43 if ( !app_dir.exists("C:\\kdepim\\apps\\kaddressbook") ) 45 app_dir.mkdir (hdir);
44 app_dir.mkdir ("C:\\kdepim\\apps\\kaddressbook");
45 } 46 }
46#endif 47#endif
48#endif
47 49
48 bool exitHelp = false; 50 bool exitHelp = false;