author | zautrix <zautrix> | 2005-01-25 15:12:21 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-25 15:12:21 (UTC) |
commit | fe4e6e85abc2ec90cc80108fc7434899b6e13048 (patch) (unidiff) | |
tree | 9a3cf83ecf8796d0020076e4e8e275d193fb2584 /korganizer/main.cpp | |
parent | 165d969ce6ac38c5e3d7b5c629af0b00d0fff017 (diff) | |
download | kdepimpi-fe4e6e85abc2ec90cc80108fc7434899b6e13048.zip kdepimpi-fe4e6e85abc2ec90cc80108fc7434899b6e13048.tar.gz kdepimpi-fe4e6e85abc2ec90cc80108fc7434899b6e13048.tar.bz2 |
small fixes
-rw-r--r-- | korganizer/main.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/korganizer/main.cpp b/korganizer/main.cpp index 2481ca4..4b207d9 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp | |||
@@ -13,2 +13,3 @@ | |||
13 | #include <qsgistyle.h> | 13 | #include <qsgistyle.h> |
14 | #include <stdlib.h> | ||
14 | #endif | 15 | #endif |
@@ -31,18 +32,18 @@ int main( int argc, char **argv ) | |||
31 | QApplication::setStyle( new QPlatinumStyle ()); | 32 | QApplication::setStyle( new QPlatinumStyle ()); |
32 | QString hdir = QDir::homeDirPath(); | 33 | #ifdef _WIN32_ |
33 | // there is a bug when creating dirs for WIN 98 | 34 | QString hdir ( getenv( "HOME") ); |
34 | // it is difficult to fix, because we have no WIN 98 runnung | 35 | if ( hdir.isEmpty() ) { |
35 | // such that we try it to create the dirs at startup here | 36 | QString hd ("C:/" ); |
36 | if ( hdir == "C:\\" ) { // win 98 or ME | 37 | //QMessageBox::information(0,"hh",QDir::homeDirPath()+" xx" +hd ); |
38 | if ( QDir::homeDirPath().lower() == hd.lower() ) { | ||
39 | _putenv( "HOME=C:"); | ||
40 | //QMessageBox::information(0,"hh",QString ( getenv( "HOME") ) ); | ||
41 | } | ||
42 | } else { | ||
37 | QDir app_dir; | 43 | QDir app_dir; |
38 | if ( !app_dir.exists("C:\\kdepim") ) | 44 | if ( !app_dir.exists(hdir) ) |
39 | app_dir.mkdir ("C:\\kdepim"); | 45 | app_dir.mkdir (hdir); |
40 | if ( !app_dir.exists("C:\\kdepim\\apps") ) | ||
41 | app_dir.mkdir ("C:\\kdepim\\apps"); | ||
42 | if ( !app_dir.exists("C:\\kdepim\\config") ) | ||
43 | app_dir.mkdir ("C:\\kdepim\\config"); | ||
44 | if ( !app_dir.exists("C:\\kdepim\\apps\\korganizer") ) | ||
45 | app_dir.mkdir ("C:\\kdepim\\apps\\korganizer"); | ||
46 | } | 46 | } |
47 | #endif | 47 | #endif |
48 | #endif | ||
48 | bool exitHelp = false; | 49 | bool exitHelp = false; |