summaryrefslogtreecommitdiffabout
path: root/korganizer/main.cpp
Unidiff
Diffstat (limited to 'korganizer/main.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index c8a55d2..ca53828 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -1,38 +1,39 @@
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 <qcopchannel_qws.h>
6#include <qpe/global.h> 6#include <qpe/global.h>
7#include <stdlib.h> 7#include <stdlib.h>
8#else 8#else
9#include <qapplication.h> 9#include <qapplication.h>
10#include <qstring.h> 10#include <qstring.h>
11#include <qwindowsstyle.h> 11#include <qwindowsstyle.h>
12#include <qplatinumstyle.h> 12#include <qplatinumstyle.h>
13#include <qsgistyle.h> 13#include <qsgistyle.h>
14#endif 14#endif
15#include <qtextcodec.h>
15 16
16#include <qdir.h> 17#include <qdir.h>
17#include <kstandarddirs.h> 18#include <kstandarddirs.h>
18#include <kglobal.h> 19#include <kglobal.h>
19#include <stdio.h> 20#include <stdio.h>
20#include "mainwindow.h" 21#include "mainwindow.h"
21 22
22int main( int argc, char **argv ) 23int main( int argc, char **argv )
23{ 24{
24#ifndef DESKTOP_VERSION 25#ifndef DESKTOP_VERSION
25 QPEApplication a( argc, argv ); 26 QPEApplication a( argc, argv );
26 a.setKeepRunning (); 27 a.setKeepRunning ();
27#else 28#else
28 QApplication a( argc, argv ); 29 QApplication a( argc, argv );
29 QApplication::setStyle( new QPlatinumStyle ()); 30 QApplication::setStyle( new QPlatinumStyle ());
30 QString hdir = QDir::homeDirPath(); 31 QString hdir = QDir::homeDirPath();
31 // there is a bug when creating dirs for WIN 98 32 // there is a bug when creating dirs for WIN 98
32 // it is difficult to fix, because we have no WIN 98 runnung 33 // it is difficult to fix, because we have no WIN 98 runnung
33 // such that we try it to create the dirs at startup here 34 // such that we try it to create the dirs at startup here
34 if ( hdir == "C:\\" ) { // win 98 or ME 35 if ( hdir == "C:\\" ) { // win 98 or ME
35 QDir app_dir; 36 QDir app_dir;
36 if ( !app_dir.exists("C:\\kdepim") ) 37 if ( !app_dir.exists("C:\\kdepim") )
37 app_dir.mkdir ("C:\\kdepim"); 38 app_dir.mkdir ("C:\\kdepim");
38 if ( !app_dir.exists("C:\\kdepim\\apps") ) 39 if ( !app_dir.exists("C:\\kdepim\\apps") )
@@ -76,29 +77,30 @@ int main( int argc, char **argv )
76#else 77#else
77 fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; 78 fileName = qApp->applicationDirPath () + "/kdepim/korganizer/";
78 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 79 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
79#endif 80#endif
80 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer"))); 81 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer")));
81 MainWindow m; 82 MainWindow m;
82#ifndef DESKTOP_VERSION 83#ifndef DESKTOP_VERSION
83 84
84 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& )));
85 a.showMainWidget(&m ); 86 a.showMainWidget(&m );
86#else 87#else
87 a.setMainWidget(&m ); 88 a.setMainWidget(&m );
88 m.show(); 89 m.show();
89 //m.resize( 800, 600 ); 90 //m.resize( 800, 600 );
90 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); 91 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
91#endif 92#endif
92 if ( argc > 1 ) { 93 if ( argc > 1 ) {
93 QCString command = argv[1]; 94 QCString command = argv[1];
94 if ( argc > 2 ) 95 if ( argc > 2 )
95 command += argv[2]; 96 command += argv[2];
96 qApp->processEvents(); 97 qApp->processEvents();
97 m.recieve(command, QByteArray() ); 98 m.recieve(command, QByteArray() );
98 99
99 } 100 }
101
100 a.exec(); 102 a.exec();
101 103
102 } 104 }
103 qDebug("KO: Bye! "); 105 qDebug("KO: Bye! ");
104} 106}