author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kmicromail/main.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | kmicromail/main.cpp | 5 |
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 @@ // CHANGED 2004-08-06 Lutz Rogowski #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> +//Added by qt3to4: +#include <Q3CString> #include <libkdepim/externalapphandler.h> #include <stdlib.h> #else #include <qapplication.h> #include <qstring.h> #include <qwindowsstyle.h> #include <qplatinumstyle.h> #include <qsgistyle.h> #endif #include "opiemail.h" #include <qdir.h> #include <kstandarddirs.h> #include <kglobal.h> #include <stdio.h> #include "mainwindow.h" #include "koprefs.h" #include <libkdepim/kpimglobalprefs.h> void dumpMissing(); //using namespace Opie::Core; int main( int argc, char **argv ) { + if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); #ifndef DESKTOP_VERSION QPEApplication a( argc, argv ); a.setKeepRunning (); #else QApplication a( argc, argv ); QApplication::setStyle( new QPlatinumStyle ()); #endif //a.setFont( KOPrefs::instance()->mAppFont ); KGlobal::setAppName( "kopiemail" ); QString fileName ; #ifndef DESKTOP_VERSION fileName = getenv("QPEDIR"); if ( QApplication::desktop()->width() > 320 ) KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/icons22/"); else KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/"); #else fileName = qApp->applicationDirPath () + "/kdepim/kopiemail/icons22/"; KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); #endif KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kopiemail"))); KPimGlobalPrefs::instance()->setGlobalConfig(); QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont ); QApplication::setFont( KOPrefs::instance()->mAppFont ); OpieMail mw; #ifndef DESKTOP_VERSION //qDebug("CONNECT "); - QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); + QObject::connect( &a, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )),&mw, SLOT(message( const Q3CString&, const QByteArray& ))); // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); a.showMainWidget(&mw ); #else a.setMainWidget(&mw ); mw.show(); //m.resize( 800, 600 ); QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); #endif int rv = a.exec(); dumpMissing(); KPimGlobalPrefs::instance()->writeConfig(); return rv; } |