summaryrefslogtreecommitdiffabout
path: root/korganizer/main.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/main.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index 4194d12..2481ca4 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -1,45 +1,46 @@
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
#include <qcopchannel_qws.h>
#include <qpe/global.h>
#include <stdlib.h>
#else
#include <qapplication.h>
#include <qstring.h>
#include <qwindowsstyle.h>
#include <qplatinumstyle.h>
#include <qsgistyle.h>
#endif
#include <qtextcodec.h>
#include <qdir.h>
#include <kstandarddirs.h>
#include <kglobal.h>
#include <stdio.h>
#include "mainwindow.h"
+#include <libkdepim/kpimglobalprefs.h>
void dumpMissing();
int main( int argc, char **argv )
{
#ifndef DESKTOP_VERSION
QPEApplication a( argc, argv );
a.setKeepRunning ();
#else
QApplication a( argc, argv );
QApplication::setStyle( new QPlatinumStyle ());
QString hdir = QDir::homeDirPath();
// there is a bug when creating dirs for WIN 98
// it is difficult to fix, because we have no WIN 98 runnung
// such that we try it to create the dirs at startup here
if ( hdir == "C:\\" ) { // win 98 or ME
QDir app_dir;
if ( !app_dir.exists("C:\\kdepim") )
app_dir.mkdir ("C:\\kdepim");
if ( !app_dir.exists("C:\\kdepim\\apps") )
app_dir.mkdir ("C:\\kdepim\\apps");
if ( !app_dir.exists("C:\\kdepim\\config") )
app_dir.mkdir ("C:\\kdepim\\config");
if ( !app_dir.exists("C:\\kdepim\\apps\\korganizer") )
app_dir.mkdir ("C:\\kdepim\\apps\\korganizer");
}
@@ -80,27 +81,29 @@ int main( int argc, char **argv )
#endif
KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer")));
MainWindow m;
#ifndef DESKTOP_VERSION
QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& )));
a.showMainWidget(&m );
#else
a.setMainWidget(&m );
m.show();
//m.resize( 800, 600 );
QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
#endif
if ( argc > 1 ) {
QCString command = argv[1];
if ( argc > 2 )
command += argv[2];
qApp->processEvents();
m.recieve(command, QByteArray() );
}
a.exec();
dumpMissing();
+
+ KPimGlobalPrefs::instance()->writeConfig();
}
qDebug("KO: Bye! ");
}