author | zautrix <zautrix> | 2004-07-03 16:12:29 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-03 16:12:29 (UTC) |
commit | a95f7085c5dd7234c254750e32e44941599f3390 (patch) (unidiff) | |
tree | 1631703e01dbf2033394e4b71bc753b562528a67 /kaddressbook/mainembedded.cpp | |
parent | 9172a6c3325e2de04c72c53cdd760bd1efa46611 (diff) | |
download | kdepimpi-a95f7085c5dd7234c254750e32e44941599f3390.zip kdepimpi-a95f7085c5dd7234c254750e32e44941599f3390.tar.gz kdepimpi-a95f7085c5dd7234c254750e32e44941599f3390.tar.bz2 |
Mainembedded cleaned up
Diffstat (limited to 'kaddressbook/mainembedded.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/mainembedded.cpp | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index 47b5484..b7d6b2b 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp | |||
@@ -1,5 +1,4 @@ | |||
1 | #ifndef DESKTOP_VERSION | 1 | #ifndef DESKTOP_VERSION |
2 | #include <qpe/qpeapplication.h> | 2 | #include <qpe/qpeapplication.h> |
3 | #include <qpe/global.h> | ||
4 | #include <stdlib.h> | 3 | #include <stdlib.h> |
5 | #else | 4 | #else |
@@ -41,28 +40,12 @@ int main( int argc, char **argv ) | |||
41 | KGlobal::setAppName( "kaddressbook" ); | 40 | KGlobal::setAppName( "kaddressbook" ); |
42 | #ifndef DESKTOP_VERSION | 41 | #ifndef DESKTOP_VERSION |
43 | QString appdir = QDir::homeDirPath() + "/kdepim/apps/" + KGlobal::getAppName(); | ||
44 | |||
45 | KStandardDirs::setAppDir( appdir ); | ||
46 | KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); | 42 | KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); |
47 | #else | 43 | #else |
48 | QString fileName ; | 44 | QString fileName ; |
49 | #ifndef _WIN32_ | 45 | fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/"; |
50 | fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons16/"; | 46 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); |
51 | #else | ||
52 | fileName = qApp->applicationDirPath () + "\\kdepim\\kaddressbook\\icons16\\"; | ||
53 | #endif | ||
54 | KGlobal::iconLoader()->setIconPath(fileName); | ||
55 | QString appdir = QDir::homeDirPath(); | ||
56 | if ( appdir.right(1) == "\\" || appdir.right(1) == "/" ) | ||
57 | appdir += "kaddressbook"; | ||
58 | else | ||
59 | appdir += "/kaddressbook"; | ||
60 | KStandardDirs::setAppDir( QDir::convertSeparators( appdir )); | ||
61 | // qDebug(" %s ",KStandardDirs::appDir().latin1() ); | ||
62 | #endif // desktop | ||
63 | QDir app_dir; | ||
64 | if ( !app_dir.exists(KStandardDirs::appDir()) ) | ||
65 | app_dir.mkdir (KStandardDirs::appDir()); | ||
66 | 47 | ||
48 | #endif | ||
49 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); | ||
67 | KAddressBookMain* m = new KAddressBookMain(); | 50 | KAddressBookMain* m = new KAddressBookMain(); |
68 | //US MainWindow m; | 51 | //US MainWindow m; |
@@ -72,5 +55,4 @@ int main( int argc, char **argv ) | |||
72 | a.showMainWidget(m ); | 55 | a.showMainWidget(m ); |
73 | m->showMaximized(); | 56 | m->showMaximized(); |
74 | |||
75 | #else | 57 | #else |
76 | a.setMainWidget(m ); | 58 | a.setMainWidget(m ); |