Diffstat (limited to 'kaddressbook/mainembedded.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/mainembedded.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index 965fb06..6dd97b8 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp | |||
@@ -1,18 +1,19 @@ | |||
1 | #ifndef DESKTOP_VERSION | 1 | #ifndef DESKTOP_VERSION |
2 | #include <qpe/qpeapplication.h> | 2 | #include <qpe/qpeapplication.h> |
3 | #include <qcopchannel_qws.h> | ||
3 | #include <stdlib.h> | 4 | #include <stdlib.h> |
4 | #else | 5 | #else |
5 | #include <qapplication.h> | 6 | #include <qapplication.h> |
6 | #include <qwindowsstyle.h> | 7 | #include <qwindowsstyle.h> |
7 | #include <qplatinumstyle.h> | 8 | #include <qplatinumstyle.h> |
8 | #include <qmainwindow.h> | 9 | #include <qmainwindow.h> |
9 | #endif | 10 | #endif |
10 | 11 | ||
11 | #include <kstandarddirs.h> | 12 | #include <kstandarddirs.h> |
12 | #include <qregexp.h> | 13 | #include <qregexp.h> |
13 | #include <kglobal.h> | 14 | #include <kglobal.h> |
14 | #include <stdio.h> | 15 | #include <stdio.h> |
15 | #include <qdir.h> | 16 | #include <qdir.h> |
16 | #include "kaddressbookmain.h" | 17 | #include "kaddressbookmain.h" |
17 | #include "externalapphandler.h" | 18 | #include "externalapphandler.h" |
18 | #include <libkdepim/kpimglobalprefs.h> | 19 | #include <libkdepim/kpimglobalprefs.h> |
@@ -64,39 +65,44 @@ int main( int argc, char **argv ) | |||
64 | #else | 65 | #else |
65 | QString fileName ; | 66 | QString fileName ; |
66 | fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/"; | 67 | fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/"; |
67 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); | 68 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); |
68 | QApplication::addLibraryPath ( qApp->applicationDirPath () ); | 69 | QApplication::addLibraryPath ( qApp->applicationDirPath () ); |
69 | 70 | ||
70 | #endif | 71 | #endif |
71 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); | 72 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); |
72 | KAddressBookMain m ; | 73 | KAddressBookMain m ; |
73 | //US MainWindow m; | 74 | //US MainWindow m; |
74 | QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 75 | QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
75 | 76 | ||
76 | { | 77 | { |
77 | KPimGlobalPrefs::instance()->setGlobalConfig(); | 78 | KPimGlobalPrefs::instance()->setGlobalConfig(); |
78 | } | 79 | } |
79 | #ifndef DESKTOP_VERSION | 80 | #ifndef DESKTOP_VERSION |
80 | a.showMainWidget( &m ); | 81 | a.showMainWidget( &m ); |
82 | QCopChannel* c1 = new QCopChannel("QPE/Application/addressbook",&m, "channelAB" ) ; | ||
83 | QObject::connect( c1, SIGNAL (received ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); | ||
81 | #else | 84 | #else |
82 | a.setMainWidget( &m ); | 85 | a.setMainWidget( &m ); |
83 | m.resize (640, 480 ); | 86 | m.resize (640, 480 ); |
84 | m.show(); | 87 | m.show(); |
85 | #endif | 88 | #endif |
86 | a.exec(); | 89 | a.exec(); |
90 | #ifndef DESKTOP_VERSION | ||
91 | delete c1; | ||
92 | #endif | ||
87 | 93 | ||
88 | } | 94 | } |
89 | qDebug("KA: Bye! "); | 95 | qDebug("KA: Bye! "); |
90 | } | 96 | } |
91 | 97 | ||
92 | /* | 98 | /* |
93 | #include <stdlib.h> | 99 | #include <stdlib.h> |
94 | 100 | ||
95 | #include <qstring.h> | 101 | #include <qstring.h> |
96 | 102 | ||
97 | #include <kabc/stdaddressbook.h> | 103 | #include <kabc/stdaddressbook.h> |
98 | #include <kaboutdata.h> | 104 | #include <kaboutdata.h> |
99 | #include <kcmdlineargs.h> | 105 | #include <kcmdlineargs.h> |
100 | #include <kcrash.h> | 106 | #include <kcrash.h> |
101 | #include <kdebug.h> | 107 | #include <kdebug.h> |
102 | #include <klocale.h> | 108 | #include <klocale.h> |