-rw-r--r-- | korganizer/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/korganizer/main.cpp b/korganizer/main.cpp index 7f9b5c6..16186c0 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp | |||
@@ -1,16 +1,17 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | #ifndef DESKTOP_VERSION | 3 | #ifndef DESKTOP_VERSION |
4 | #include <qpe/qpeapplication.h> | 4 | #include <qpe/qpeapplication.h> |
5 | #include <qcopchannel_qws.h> | ||
5 | #include <qpe/global.h> | 6 | #include <qpe/global.h> |
6 | #include <stdlib.h> | 7 | #include <stdlib.h> |
7 | #else | 8 | #else |
8 | #include <qapplication.h> | 9 | #include <qapplication.h> |
9 | #include <qstring.h> | 10 | #include <qstring.h> |
10 | #include <qwindowsstyle.h> | 11 | #include <qwindowsstyle.h> |
11 | #include <qplatinumstyle.h> | 12 | #include <qplatinumstyle.h> |
12 | #include <qsgistyle.h> | 13 | #include <qsgistyle.h> |
13 | #endif | 14 | #endif |
14 | 15 | ||
15 | #include <qdir.h> | 16 | #include <qdir.h> |
16 | #include <kstandarddirs.h> | 17 | #include <kstandarddirs.h> |
@@ -70,33 +71,38 @@ int main( int argc, char **argv ) | |||
70 | KGlobal::setAppName( "korganizer" ); | 71 | KGlobal::setAppName( "korganizer" ); |
71 | QString fileName ; | 72 | QString fileName ; |
72 | #ifndef DESKTOP_VERSION | 73 | #ifndef DESKTOP_VERSION |
73 | fileName = getenv("QPEDIR"); | 74 | fileName = getenv("QPEDIR"); |
74 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/"); | 75 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/"); |
75 | #else | 76 | #else |
76 | fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; | 77 | fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; |
77 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); | 78 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); |
78 | #endif | 79 | #endif |
79 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer"))); | 80 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer"))); |
80 | MainWindow m; | 81 | MainWindow m; |
81 | #ifndef DESKTOP_VERSION | 82 | #ifndef DESKTOP_VERSION |
83 | QCopChannel* c1 = new QCopChannel("QPE/Application/datebook",&m, "channel" ) ; | ||
84 | QObject::connect( c1, SIGNAL (received ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); | ||
82 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); | 85 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); |
83 | a.showMainWidget(&m ); | 86 | a.showMainWidget(&m ); |
84 | #else | 87 | #else |
85 | a.setMainWidget(&m ); | 88 | a.setMainWidget(&m ); |
86 | m.show(); | 89 | m.show(); |
87 | //m.resize( 800, 600 ); | 90 | //m.resize( 800, 600 ); |
88 | QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); | 91 | QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); |
89 | #endif | 92 | #endif |
90 | if ( argc > 1 ) { | 93 | if ( argc > 1 ) { |
91 | QCString command = argv[1]; | 94 | QCString command = argv[1]; |
92 | if ( argc > 2 ) | 95 | if ( argc > 2 ) |
93 | command += argv[2]; | 96 | command += argv[2]; |
94 | qApp->processEvents(); | 97 | qApp->processEvents(); |
95 | m.recieve(command, QByteArray() ); | 98 | m.recieve(command, QByteArray() ); |
96 | 99 | ||
97 | } | 100 | } |
98 | a.exec(); | 101 | a.exec(); |
102 | #ifndef DESKTOP_VERSION | ||
103 | delete c1; | ||
104 | #endif | ||
99 | 105 | ||
100 | } | 106 | } |
101 | qDebug("KO: Bye! "); | 107 | qDebug("KO: Bye! "); |
102 | } | 108 | } |