summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/applauncher.cpp69
1 files changed, 39 insertions, 30 deletions
diff --git a/core/launcher/applauncher.cpp b/core/launcher/applauncher.cpp
index 50c1b71..d6f93da 100644
--- a/core/launcher/applauncher.cpp
+++ b/core/launcher/applauncher.cpp
@@ -29,3 +29,3 @@
29#endif 29#endif
30#include <qtopia/qpeglobal.h> 30#include <qtopia/global.h>
31 31
@@ -63,2 +63,3 @@
63#include "documentlist.h" 63#include "documentlist.h"
64#include "launcherglobal.h"
64 65
@@ -77,3 +78,3 @@ public:
77 : QCustomEvent( appStopEventID ), mPid(pid), mStatus(status) { } 78 : QCustomEvent( appStopEventID ), mPid(pid), mStatus(status) { }
78 79
79 int pid() { return mPid; } 80 int pid() { return mPid; }
@@ -98,3 +99,3 @@ AppLauncher::AppLauncher(QObject *parent, const char *name)
98 this, SLOT(received(const QCString&, const QByteArray&)) ); 99 this, SLOT(received(const QCString&, const QByteArray&)) );
99 100
100#ifndef Q_OS_WIN32 101#ifndef Q_OS_WIN32
@@ -109,3 +110,3 @@ AppLauncher::AppLauncher(QObject *parent, const char *name)
109 runningApps[::getpid()] = tmp; 110 runningApps[::getpid()] = tmp;
110 111
111 appLauncherPtr = this; 112 appLauncherPtr = this;
@@ -130,3 +131,3 @@ AppLauncher::~AppLauncher()
130 so that we can disable the busy indicators */ 131 so that we can disable the busy indicators */
131void AppLauncher::newQcopChannel(const QString& channelName) 132void AppLauncher::newQcopChannel(const QString& channelName)
132{ 133{
@@ -153,3 +154,3 @@ void AppLauncher::newQcopChannel(const QString& channelName)
153 154
154void AppLauncher::removedQcopChannel(const QString& channelName) 155void AppLauncher::removedQcopChannel(const QString& channelName)
155{ 156{
@@ -261,3 +262,3 @@ bool AppLauncher::event(QEvent *e)
261 } 262 }
262 263
263 return QObject::event(e); 264 return QObject::event(e);
@@ -284,7 +285,7 @@ void AppLauncher::timerEvent( QTimerEvent *e )
284 tr("<p>%1 is not responding.</p>").arg(appKillerName) + 285 tr("<p>%1 is not responding.</p>").arg(appKillerName) +
285 tr("<p>Would you like to force the application to exit?</p>"), 286 tr("<p>Would you like to force the application to exit?</p>"),
286 QMessageBox::Warning, QMessageBox::Yes, 287 QMessageBox::Warning, QMessageBox::Yes,
287 QMessageBox::No | QMessageBox::Default, 288 QMessageBox::No | QMessageBox::Default,
288 QMessageBox::NoButton); 289 QMessageBox::NoButton);
289 if (appKillerBox->exec() == QMessageBox::Yes) { 290 if (appKillerBox->exec() == QMessageBox::Yes) {
290 // qDebug("Killing the app!!! Bwuhahahaha!"); 291 // qDebug("Killing the app!!! Bwuhahahaha!");
@@ -304,3 +305,3 @@ void AppLauncher::timerEvent( QTimerEvent *e )
304 305
305#ifndef Q_OS_WIN32 306#ifndef Q_OS_WIN32
306void AppLauncher::sigStopped(int sigPid, int sigStatus) 307void AppLauncher::sigStopped(int sigPid, int sigStatus)
@@ -308,3 +309,3 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
308 int exitStatus = 0; 309 int exitStatus = 0;
309 310
310 bool crashed = WIFSIGNALED(sigStatus); 311 bool crashed = WIFSIGNALED(sigStatus);
@@ -366,3 +367,3 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
366 367
367 // clean up 368 // clean up
368 if ( exitStatus ) { 369 if ( exitStatus ) {
@@ -371,3 +372,3 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
371 } 372 }
372/* 373/*
373 // debug info 374 // debug info
@@ -398,3 +399,3 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
398 sig += tr("<qt><p>Fast loading has been disabled for this application. Tap and hold the application icon to reenable it.</qt>"); 399 sig += tr("<qt><p>Fast loading has been disabled for this application. Tap and hold the application icon to reenable it.</qt>");
399 400
400 QString str = tr("<qt><b>%1</b> was terminated due to signal code %2</qt>").arg( app->name() ).arg( sig ); 401 QString str = tr("<qt><b>%1</b> was terminated due to signal code %2</qt>").arg( app->name() ).arg( sig );
@@ -405,6 +406,7 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
405 } else { 406 } else {
406 QFileInfo fi(Global::tempDir() + "qcop-msg-" + appName); 407 QFileInfo fi(Opie::Global::tempDir() + "qcop-msg-" + appName);
407 if ( fi.exists() && fi.size() ) { 408 if ( fi.exists() && fi.size() ) {
408 emit terminated(sigPid, appName); 409 emit terminated(sigPid, appName);
409 execute( appName, QString::null ); 410 qWarning("Re executing obmitted for %s", appName.latin1() );
411 // execute( appName, QString::null );
410 return; 412 return;
@@ -415,3 +417,3 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
415#endif 417#endif
416 418
417 emit terminated(sigPid, appName); 419 emit terminated(sigPid, appName);
@@ -446,5 +448,5 @@ bool AppLauncher::executeBuiltin(const QString &c, const QString &document)
446{ 448{
447 Global::Command* builtin = Global::builtinCommands(); 449 Global::Command* builtin = Opie::Global::builtinCommands();
448 QGuardedPtr<QWidget> *running = Global::builtinRunning(); 450 QGuardedPtr<QWidget> *running = Opie::Global::builtinRunning();
449 451
450 // Attempt to execute the app using a builtin class for the app 452 // Attempt to execute the app using a builtin class for the app
@@ -485,2 +487,3 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
485{ 487{
488 qWarning("AppLauncher::execute");
486 // Convert the command line in to a list of arguments 489 // Convert the command line in to a list of arguments
@@ -494,5 +497,5 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
494 channel += appName.latin1(); 497 channel += appName.latin1();
495 498
496 // Need to lock it to avoid race conditions with QPEApplication::processQCopFile 499 // Need to lock it to avoid race conditions with QPEApplication::processQCopFile
497 QFile f(Global::tempDir() + "qcop-msg-" + appName); 500 QFile f(Opie::Global::tempDir() + "qcop-msg-" + appName);
498 if ( !noRaise && f.open(IO_WriteOnly | IO_Append) ) { 501 if ( !noRaise && f.open(IO_WriteOnly | IO_Append) ) {
@@ -501,3 +504,3 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
501#endif 504#endif
502 505
503 QDataStream ds(&f); 506 QDataStream ds(&f);
@@ -525,3 +528,3 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
525 QCopChannel::send(channel,"QPEProcessQCop()"); 528 QCopChannel::send(channel,"QPEProcessQCop()");
526 529
527 return TRUE; 530 return TRUE;
@@ -530,3 +533,3 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
530#ifdef QT_NO_QWS_MULTIPROCESS 533#ifdef QT_NO_QWS_MULTIPROCESS
531 QMessageBox::warning( 0, tr("Error"), tr("Could not find the application %1").arg(c), 534 QMessageBox::warning( 0, tr("Error"), tr("<qt>Could not find the application %1</qt>").arg(c),
532 tr("OK"), 0, 0, 0, 1 ); 535 tr("OK"), 0, 0, 0, 1 );
@@ -587,3 +590,3 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
587 DWORD pid = procInfo->dwProcessId; 590 DWORD pid = procInfo->dwProcessId;
588 runningApps[pid] = QString(args[0]); 591 runningApps[pid] = QString(args[0]);
589 runningAppsProc.append(proc); 592 runningAppsProc.append(proc);
@@ -637,2 +640,6 @@ void AppLauncher::createQuickLauncher()
637{ 640{
641 static bool disabled = FALSE;
642 if (disabled)
643 return;
644
638 qlReady = FALSE; 645 qlReady = FALSE;
@@ -650,2 +657,4 @@ void AppLauncher::createQuickLauncher()
650 ::execvp( "quicklauncher", args ); 657 ::execvp( "quicklauncher", args );
658 delete []args;
659 disabled = TRUE;
651 _exit( -1 ); 660 _exit( -1 );
@@ -673,3 +682,3 @@ void AppLauncher::processExited()
673 qDebug("Removing application %s", appName.latin1()); 682 qDebug("Removing application %s", appName.latin1());
674 runningAppsProc.remove(proc); 683 runningAppsProc.remove(proc);
675 684
@@ -701,3 +710,3 @@ void AppLauncher::processExited()
701 } 710 }
702 711
703#endif 712#endif