-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,6 +1,5 @@ | |||
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 |
6 | #include <qapplication.h> | 5 | #include <qapplication.h> |
@@ -40,30 +39,14 @@ int main( int argc, char **argv ) | |||
40 | 39 | ||
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; |
69 | //US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); | 52 | //US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); |
@@ -71,7 +54,6 @@ int main( int argc, char **argv ) | |||
71 | #ifndef DESKTOP_VERSION | 54 | #ifndef DESKTOP_VERSION |
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 ); |
77 | m->show(); | 59 | m->show(); |