summaryrefslogtreecommitdiff
path: root/core/tools
authorzecke <zecke>2004-09-26 13:42:38 (UTC)
committer zecke <zecke>2004-09-26 13:42:38 (UTC)
commit77441b90e9b5a4a23b080e7ac53a512abe96f8a9 (patch) (side-by-side diff)
tree1e2d8eef39f651561f817042fe4319e86156b7a0 /core/tools
parent358c159e5d4f28eedfbd8e539e4420324c565eba (diff)
downloadopie-77441b90e9b5a4a23b080e7ac53a512abe96f8a9.zip
opie-77441b90e9b5a4a23b080e7ac53a512abe96f8a9.tar.gz
opie-77441b90e9b5a4a23b080e7ac53a512abe96f8a9.tar.bz2
Fix the indentation...
Diffstat (limited to 'core/tools') (more/less context) (show whitespace changes)
-rw-r--r--core/tools/quicklauncher/main.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/core/tools/quicklauncher/main.cpp b/core/tools/quicklauncher/main.cpp
index b1befce..fb2ca44 100644
--- a/core/tools/quicklauncher/main.cpp
+++ b/core/tools/quicklauncher/main.cpp
@@ -79,6 +79,7 @@ void setproctitle (const char *fmt,...) {
i = argv_lth - 2;
buf[i] = '\0';
}
+
memset(argv0[0], '\0', argv_lth); /* clear the memory area */
(void) strcpy (argv0[0], buf);
@@ -111,6 +112,7 @@ public:
if ( loader->queryInterface(appName, IID_QtopiaApplication, (QUnknownInterface**)&appIface) == QS_OK ) {
mainWindow = appIface->createMainWindow( appName );
}
+
if ( mainWindow ) {
if ( mainWindow->metaObject()->slotNames().contains("setDocument(const QString&)") ) {
app->showMainDocumentWidget( mainWindow );
@@ -154,10 +156,12 @@ private:
{
static int myargc = argList.count();
static char **myargv = new char *[myargc + 1];
+
for ( int j = 0; j < myargc; j++ ) {
myargv[j] = new char [strlen(argList.at(j))+1];
strcpy( myargv[j], argList.at(j) );
}
+
myargv[myargc] = NULL;
#ifdef _OS_LINUX_
// Change name of process
@@ -184,8 +188,10 @@ int main( int argc, char** argv )
QCString arg0 = argv[0];
int sep = arg0.findRev( '/' );
+
if ( sep > 0 )
arg0 = arg0.mid( sep+1 );
+
if ( arg0 != "quicklauncher" ) {
odebug << "QuickLauncher invoked as: " << arg0.data() << oendl;
QuickLauncher::exec( argc, argv );
@@ -225,11 +231,6 @@ int main( int argc, char** argv )
// Each of the following force internal structures/internal
// initialization to be performed. This may mean allocating
// memory that is not needed by all applications.
-#if 0
- TimeZone::current().isValid(); // popuplate timezone cache
- TimeString::currentDateFormat(); // create internal structures
- TimeString::currentAMPM();
-#endif
Resource::loadIconSet("new"); // do internal init
/* make sure libopie gets lined in */
@@ -251,11 +252,13 @@ int main( int argc, char** argv )
if ( mainWindow )
delete (QWidget*)mainWindow;
-
delete app;
+
if ( appIface )
loader->releaseInterface( appIface );
delete loader;
+
+
// Neither QLibrary nor my Dropin is a QObject and they don't depend
// on a qApp so we destroy QWidget::destroyMapper() without
// crashing the app