summaryrefslogtreecommitdiffabout
path: root/kmicromail/main.cpp
Unidiff
Diffstat (limited to 'kmicromail/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/main.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp
index a4f6a06..8a093c6 100644
--- a/kmicromail/main.cpp
+++ b/kmicromail/main.cpp
@@ -31,28 +31,27 @@ int main( int argc, char **argv ) {
31 QString fileName ; 31 QString fileName ;
32#ifndef DESKTOP_VERSION 32#ifndef DESKTOP_VERSION
33 fileName = getenv("QPEDIR"); 33 fileName = getenv("QPEDIR");
34 if ( QApplication::desktop()->width() > 320 ) 34 if ( QApplication::desktop()->width() > 320 )
35 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/icons22/"); 35 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/icons22/");
36 else 36 else
37 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/"); 37 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/");
38#else 38#else
39 fileName = qApp->applicationDirPath () + "/kdepim/kmicromail/"; 39 fileName = qApp->applicationDirPath () + "/kdepim/kmicromail/";
40 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 40 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
41#endif 41#endif
42 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kmicromail"))); 42 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kmicromail")));
43 OpieMail* mw = new OpieMail(); 43 OpieMail mw;
44#ifndef DESKTOP_VERSION 44#ifndef DESKTOP_VERSION
45 //qDebug("CONNECT "); 45 //qDebug("CONNECT ");
46 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),mw, SLOT(message( const QCString&, const QByteArray& ))); 46 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& )));
47 a.showMainWidget(mw ); 47 a.showMainWidget(&mw );
48#else 48#else
49 a.setMainWidget(mw ); 49 a.setMainWidget(&mw );
50 m.show(); 50 mw.show();
51 //m.resize( 800, 600 ); 51 //m.resize( 800, 600 );
52#endif
53 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); 52 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
53#endif
54 int rv = a.exec(); 54 int rv = a.exec();
55 delete mw;
56 return rv; 55 return rv;
57 56
58} 57}