-rw-r--r-- | kmicromail/main.cpp | 13 |
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 @@ -35,24 +35,23 @@ int main( int argc, char **argv ) { KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/icons22/"); else KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/"); #else fileName = qApp->applicationDirPath () + "/kdepim/kmicromail/"; KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); #endif KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kmicromail"))); - OpieMail* mw = new OpieMail(); + OpieMail mw; #ifndef DESKTOP_VERSION //qDebug("CONNECT "); - QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),mw, SLOT(message( const QCString&, const QByteArray& ))); - a.showMainWidget(mw ); + QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); + a.showMainWidget(&mw ); #else - a.setMainWidget(mw ); - m.show(); + a.setMainWidget(&mw ); + mw.show(); //m.resize( 800, 600 ); -#endif QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); +#endif int rv = a.exec(); - delete mw; return rv; } |