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