summaryrefslogtreecommitdiffabout
path: root/kmicromail/main.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kmicromail/main.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kmicromail/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp
index fe4bc76..dc73455 100644
--- a/kmicromail/main.cpp
+++ b/kmicromail/main.cpp
@@ -1,69 +1,72 @@
1// CHANGED 2004-08-06 Lutz Rogowski 1// CHANGED 2004-08-06 Lutz Rogowski
2 2
3 3
4#ifndef DESKTOP_VERSION 4#ifndef DESKTOP_VERSION
5#include <qpe/qpeapplication.h> 5#include <qpe/qpeapplication.h>
6//Added by qt3to4:
7#include <Q3CString>
6#include <libkdepim/externalapphandler.h> 8#include <libkdepim/externalapphandler.h>
7#include <stdlib.h> 9#include <stdlib.h>
8#else 10#else
9#include <qapplication.h> 11#include <qapplication.h>
10#include <qstring.h> 12#include <qstring.h>
11#include <qwindowsstyle.h> 13#include <qwindowsstyle.h>
12#include <qplatinumstyle.h> 14#include <qplatinumstyle.h>
13#include <qsgistyle.h> 15#include <qsgistyle.h>
14#endif 16#endif
15#include "opiemail.h" 17#include "opiemail.h"
16#include <qdir.h> 18#include <qdir.h>
17#include <kstandarddirs.h> 19#include <kstandarddirs.h>
18#include <kglobal.h> 20#include <kglobal.h>
19#include <stdio.h> 21#include <stdio.h>
20#include "mainwindow.h" 22#include "mainwindow.h"
21#include "koprefs.h" 23#include "koprefs.h"
22#include <libkdepim/kpimglobalprefs.h> 24#include <libkdepim/kpimglobalprefs.h>
23void dumpMissing(); 25void dumpMissing();
24//using namespace Opie::Core; 26//using namespace Opie::Core;
25int main( int argc, char **argv ) { 27int main( int argc, char **argv ) {
28 if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi");
26 29
27#ifndef DESKTOP_VERSION 30#ifndef DESKTOP_VERSION
28 QPEApplication a( argc, argv ); 31 QPEApplication a( argc, argv );
29 a.setKeepRunning (); 32 a.setKeepRunning ();
30#else 33#else
31 QApplication a( argc, argv ); 34 QApplication a( argc, argv );
32 QApplication::setStyle( new QPlatinumStyle ()); 35 QApplication::setStyle( new QPlatinumStyle ());
33#endif 36#endif
34 //a.setFont( KOPrefs::instance()->mAppFont ); 37 //a.setFont( KOPrefs::instance()->mAppFont );
35 KGlobal::setAppName( "kopiemail" ); 38 KGlobal::setAppName( "kopiemail" );
36 QString fileName ; 39 QString fileName ;
37#ifndef DESKTOP_VERSION 40#ifndef DESKTOP_VERSION
38 fileName = getenv("QPEDIR"); 41 fileName = getenv("QPEDIR");
39 if ( QApplication::desktop()->width() > 320 ) 42 if ( QApplication::desktop()->width() > 320 )
40 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/icons22/"); 43 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/icons22/");
41 else 44 else
42 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/"); 45 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/");
43#else 46#else
44 fileName = qApp->applicationDirPath () + "/kdepim/kopiemail/icons22/"; 47 fileName = qApp->applicationDirPath () + "/kdepim/kopiemail/icons22/";
45 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 48 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
46#endif 49#endif
47 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kopiemail"))); 50 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kopiemail")));
48 KPimGlobalPrefs::instance()->setGlobalConfig(); 51 KPimGlobalPrefs::instance()->setGlobalConfig();
49 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont ); 52 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
50 QApplication::setFont( KOPrefs::instance()->mAppFont ); 53 QApplication::setFont( KOPrefs::instance()->mAppFont );
51 OpieMail mw; 54 OpieMail mw;
52#ifndef DESKTOP_VERSION 55#ifndef DESKTOP_VERSION
53 //qDebug("CONNECT "); 56 //qDebug("CONNECT ");
54 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); 57 QObject::connect( &a, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )),&mw, SLOT(message( const Q3CString&, const QByteArray& )));
55 // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 58 // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
56 a.showMainWidget(&mw ); 59 a.showMainWidget(&mw );
57#else 60#else
58 a.setMainWidget(&mw ); 61 a.setMainWidget(&mw );
59 mw.show(); 62 mw.show();
60 //m.resize( 800, 600 ); 63 //m.resize( 800, 600 );
61 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); 64 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
62#endif 65#endif
63 int rv = a.exec(); 66 int rv = a.exec();
64 dumpMissing(); 67 dumpMissing();
65 68
66 KPimGlobalPrefs::instance()->writeConfig(); 69 KPimGlobalPrefs::instance()->writeConfig();
67 return rv; 70 return rv;
68 71
69} 72}