Diffstat (limited to 'kaddressbook/mainembedded.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/mainembedded.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index 3f6f69d..47b5484 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp | |||
@@ -19,49 +19,51 @@ int main( int argc, char **argv ) | |||
19 | { | 19 | { |
20 | #ifndef DESKTOP_VERSION | 20 | #ifndef DESKTOP_VERSION |
21 | QPEApplication a( argc, argv ); | 21 | QPEApplication a( argc, argv ); |
22 | a.setKeepRunning (); | 22 | a.setKeepRunning (); |
23 | #else | 23 | #else |
24 | QApplication a( argc, argv ); | 24 | QApplication a( argc, argv ); |
25 | QApplication::setStyle( new QPlatinumStyle ()); | 25 | QApplication::setStyle( new QPlatinumStyle ()); |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | bool exitHelp = false; | 28 | bool exitHelp = false; |
29 | if ( argc > 1 ) { | 29 | if ( argc > 1 ) { |
30 | QString command = argv[1]; | 30 | QString command = argv[1]; |
31 | if ( command == "-help" ){ | 31 | if ( command == "-help" ){ |
32 | printf("KA/E command line commands:\n"); | 32 | printf("KA/E command line commands:\n"); |
33 | printf(" no command: Start KA/E in usual way\n"); | 33 | printf(" no command: Start KA/E in usual way\n"); |
34 | printf(" -help: This output\n"); | 34 | printf(" -help: This output\n"); |
35 | printf(" KA/E is exiting now. Bye!\n"); | 35 | printf(" KA/E is exiting now. Bye!\n"); |
36 | exitHelp = true; | 36 | exitHelp = true; |
37 | } | 37 | } |
38 | } | 38 | } |
39 | if ( ! exitHelp ) { | 39 | if ( ! exitHelp ) { |
40 | 40 | ||
41 | KGlobal::setAppName( "kaddressbook" ); | 41 | KGlobal::setAppName( "kaddressbook" ); |
42 | #ifndef DESKTOP_VERSION | 42 | #ifndef DESKTOP_VERSION |
43 | KStandardDirs::setAppDir( Global::applicationFileName( "kaddressbook", "" ) ); | 43 | QString appdir = QDir::homeDirPath() + "/kdepim/apps/" + KGlobal::getAppName(); |
44 | |||
45 | KStandardDirs::setAppDir( appdir ); | ||
44 | KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); | 46 | KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); |
45 | #else | 47 | #else |
46 | QString fileName ; | 48 | QString fileName ; |
47 | #ifndef _WIN32_ | 49 | #ifndef _WIN32_ |
48 | fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons16/"; | 50 | fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons16/"; |
49 | #else | 51 | #else |
50 | fileName = qApp->applicationDirPath () + "\\kdepim\\kaddressbook\\icons16\\"; | 52 | fileName = qApp->applicationDirPath () + "\\kdepim\\kaddressbook\\icons16\\"; |
51 | #endif | 53 | #endif |
52 | KGlobal::iconLoader()->setIconPath(fileName); | 54 | KGlobal::iconLoader()->setIconPath(fileName); |
53 | QString appdir = QDir::homeDirPath(); | 55 | QString appdir = QDir::homeDirPath(); |
54 | if ( appdir.right(1) == "\\" || appdir.right(1) == "/" ) | 56 | if ( appdir.right(1) == "\\" || appdir.right(1) == "/" ) |
55 | appdir += "kaddressbook"; | 57 | appdir += "kaddressbook"; |
56 | else | 58 | else |
57 | appdir += "/kaddressbook"; | 59 | appdir += "/kaddressbook"; |
58 | KStandardDirs::setAppDir( QDir::convertSeparators( appdir )); | 60 | KStandardDirs::setAppDir( QDir::convertSeparators( appdir )); |
59 | // qDebug(" %s ",KStandardDirs::appDir().latin1() ); | 61 | // qDebug(" %s ",KStandardDirs::appDir().latin1() ); |
60 | #endif // desktop | 62 | #endif // desktop |
61 | QDir app_dir; | 63 | QDir app_dir; |
62 | if ( !app_dir.exists(KStandardDirs::appDir()) ) | 64 | if ( !app_dir.exists(KStandardDirs::appDir()) ) |
63 | app_dir.mkdir (KStandardDirs::appDir()); | 65 | app_dir.mkdir (KStandardDirs::appDir()); |
64 | 66 | ||
65 | KAddressBookMain* m = new KAddressBookMain(); | 67 | KAddressBookMain* m = new KAddressBookMain(); |
66 | //US MainWindow m; | 68 | //US MainWindow m; |
67 | //US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); | 69 | //US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); |