summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-07-03 16:12:29 (UTC)
committer zautrix <zautrix>2004-07-03 16:12:29 (UTC)
commita95f7085c5dd7234c254750e32e44941599f3390 (patch) (side-by-side diff)
tree1631703e01dbf2033394e4b71bc753b562528a67
parent9172a6c3325e2de04c72c53cdd760bd1efa46611 (diff)
downloadkdepimpi-a95f7085c5dd7234c254750e32e44941599f3390.zip
kdepimpi-a95f7085c5dd7234c254750e32e44941599f3390.tar.gz
kdepimpi-a95f7085c5dd7234c254750e32e44941599f3390.tar.bz2
Mainembedded cleaned up
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/mainembedded.cpp26
1 files changed, 4 insertions, 22 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index 47b5484..b7d6b2b 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -1,7 +1,6 @@
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
-#include <qpe/global.h>
#include <stdlib.h>
#else
#include <qapplication.h>
#include <qwindowsstyle.h>
@@ -39,40 +38,23 @@ int main( int argc, char **argv )
if ( ! exitHelp ) {
KGlobal::setAppName( "kaddressbook" );
#ifndef DESKTOP_VERSION
- QString appdir = QDir::homeDirPath() + "/kdepim/apps/" + KGlobal::getAppName();
-
- KStandardDirs::setAppDir( appdir );
KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/");
#else
QString fileName ;
-#ifndef _WIN32_
- fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons16/";
-#else
- fileName = qApp->applicationDirPath () + "\\kdepim\\kaddressbook\\icons16\\";
-#endif
- KGlobal::iconLoader()->setIconPath(fileName);
- QString appdir = QDir::homeDirPath();
- if ( appdir.right(1) == "\\" || appdir.right(1) == "/" )
- appdir += "kaddressbook";
- else
- appdir += "/kaddressbook";
- KStandardDirs::setAppDir( QDir::convertSeparators( appdir ));
- // qDebug(" %s ",KStandardDirs::appDir().latin1() );
-#endif // desktop
- QDir app_dir;
- if ( !app_dir.exists(KStandardDirs::appDir()) )
- app_dir.mkdir (KStandardDirs::appDir());
+ fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/";
+ KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
+#endif
+ KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
KAddressBookMain* m = new KAddressBookMain();
//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();
-
#else
a.setMainWidget(m );
m->show();
//m->resize( 640, 480 );