summaryrefslogtreecommitdiffabout
path: root/kaddressbook/mainembedded.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/mainembedded.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/mainembedded.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index c127601..dce6a88 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -21,75 +21,73 @@ int main( int argc, char **argv )
a.setKeepRunning ();
#else
QApplication a( argc, argv );
QApplication::setStyle( new QPlatinumStyle ());
#endif
bool exitHelp = false;
if ( argc > 1 ) {
QString command = argv[1];
if ( command == "-help" ){
printf("KA/E command line commands:\n");
printf(" no command: Start KA/E in usual way\n");
printf(" -help: This output\n");
printf(" KA/E is exiting now. Bye!\n");
exitHelp = true;
}
}
if ( ! exitHelp ) {
KGlobal::setAppName( "kaddressbook" );
#ifndef DESKTOP_VERSION
if ( QApplication::desktop()->width() > 320 )
KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/");
else
KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/");
#else
QString fileName ;
fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/";
KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
#endif
KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
- KAddressBookMain* m = new KAddressBookMain();
+ KAddressBookMain m ;
//US MainWindow m;
//US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& )));
#ifndef DESKTOP_VERSION
- a.showMainWidget(m );
- m->showMaximized();
+ a.showMainWidget( &m );
#else
a.setMainWidget(m );
m->show();
- //m->resize( 640, 480 );
#endif
a.exec();
}
qDebug("KA: Bye! ");
}
/*
#include <stdlib.h>
#include <qstring.h>
#include <kabc/stdaddressbook.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <kcrash.h>
#include <kdebug.h>
#include <klocale.h>
#include <kstartupinfo.h>
#include <kuniqueapplication.h>
#include <kwin.h>
#include "kaddressbookmain.h"
#include "kabcore.h"
extern "C" {
void crashHandler( int )
{
KABC::StdAddressBook::handleCrash();
::exit( 0 );
}