summaryrefslogtreecommitdiff
path: root/core/launcher
Side-by-side diff
Diffstat (limited to 'core/launcher') (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 @@
#endif
-#include <qtopia/qpeglobal.h>
+#include <qtopia/global.h>
@@ -63,2 +63,3 @@
#include "documentlist.h"
+#include "launcherglobal.h"
@@ -77,3 +78,3 @@ public:
: QCustomEvent( appStopEventID ), mPid(pid), mStatus(status) { }
-
+
int pid() { return mPid; }
@@ -98,3 +99,3 @@ AppLauncher::AppLauncher(QObject *parent, const char *name)
this, SLOT(received(const QCString&, const QByteArray&)) );
-
+
#ifndef Q_OS_WIN32
@@ -109,3 +110,3 @@ AppLauncher::AppLauncher(QObject *parent, const char *name)
runningApps[::getpid()] = tmp;
-
+
appLauncherPtr = this;
@@ -130,3 +131,3 @@ AppLauncher::~AppLauncher()
so that we can disable the busy indicators */
-void AppLauncher::newQcopChannel(const QString& channelName)
+void AppLauncher::newQcopChannel(const QString& channelName)
{
@@ -153,3 +154,3 @@ void AppLauncher::newQcopChannel(const QString& channelName)
-void AppLauncher::removedQcopChannel(const QString& channelName)
+void AppLauncher::removedQcopChannel(const QString& channelName)
{
@@ -261,3 +262,3 @@ bool AppLauncher::event(QEvent *e)
}
-
+
return QObject::event(e);
@@ -284,7 +285,7 @@ void AppLauncher::timerEvent( QTimerEvent *e )
tr("<p>%1 is not responding.</p>").arg(appKillerName) +
- tr("<p>Would you like to force the application to exit?</p>"),
- QMessageBox::Warning, QMessageBox::Yes,
- QMessageBox::No | QMessageBox::Default,
+ tr("<p>Would you like to force the application to exit?</p>"),
+ QMessageBox::Warning, QMessageBox::Yes,
+ QMessageBox::No | QMessageBox::Default,
QMessageBox::NoButton);
- if (appKillerBox->exec() == QMessageBox::Yes) {
+ if (appKillerBox->exec() == QMessageBox::Yes) {
// qDebug("Killing the app!!! Bwuhahahaha!");
@@ -304,3 +305,3 @@ void AppLauncher::timerEvent( QTimerEvent *e )
-#ifndef Q_OS_WIN32
+#ifndef Q_OS_WIN32
void AppLauncher::sigStopped(int sigPid, int sigStatus)
@@ -308,3 +309,3 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
int exitStatus = 0;
-
+
bool crashed = WIFSIGNALED(sigStatus);
@@ -366,3 +367,3 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
- // clean up
+ // clean up
if ( exitStatus ) {
@@ -371,3 +372,3 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
}
-/*
+/*
// debug info
@@ -398,3 +399,3 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
sig += tr("<qt><p>Fast loading has been disabled for this application. Tap and hold the application icon to reenable it.</qt>");
-
+
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)
} else {
- QFileInfo fi(Global::tempDir() + "qcop-msg-" + appName);
+ QFileInfo fi(Opie::Global::tempDir() + "qcop-msg-" + appName);
if ( fi.exists() && fi.size() ) {
emit terminated(sigPid, appName);
- execute( appName, QString::null );
+ qWarning("Re executing obmitted for %s", appName.latin1() );
+// execute( appName, QString::null );
return;
@@ -415,3 +417,3 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
#endif
-
+
emit terminated(sigPid, appName);
@@ -446,5 +448,5 @@ bool AppLauncher::executeBuiltin(const QString &c, const QString &document)
{
- Global::Command* builtin = Global::builtinCommands();
- QGuardedPtr<QWidget> *running = Global::builtinRunning();
-
+ Global::Command* builtin = Opie::Global::builtinCommands();
+ QGuardedPtr<QWidget> *running = Opie::Global::builtinRunning();
+
// 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
{
+ qWarning("AppLauncher::execute");
// 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
channel += appName.latin1();
-
+
// Need to lock it to avoid race conditions with QPEApplication::processQCopFile
- QFile f(Global::tempDir() + "qcop-msg-" + appName);
+ QFile f(Opie::Global::tempDir() + "qcop-msg-" + appName);
if ( !noRaise && f.open(IO_WriteOnly | IO_Append) ) {
@@ -501,3 +504,3 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
#endif
-
+
QDataStream ds(&f);
@@ -525,3 +528,3 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
QCopChannel::send(channel,"QPEProcessQCop()");
-
+
return TRUE;
@@ -530,3 +533,3 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
#ifdef QT_NO_QWS_MULTIPROCESS
- QMessageBox::warning( 0, tr("Error"), tr("Could not find the application %1").arg(c),
+ QMessageBox::warning( 0, tr("Error"), tr("<qt>Could not find the application %1</qt>").arg(c),
tr("OK"), 0, 0, 0, 1 );
@@ -587,3 +590,3 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
DWORD pid = procInfo->dwProcessId;
- runningApps[pid] = QString(args[0]);
+ runningApps[pid] = QString(args[0]);
runningAppsProc.append(proc);
@@ -637,2 +640,6 @@ void AppLauncher::createQuickLauncher()
{
+ static bool disabled = FALSE;
+ if (disabled)
+ return;
+
qlReady = FALSE;
@@ -650,2 +657,4 @@ void AppLauncher::createQuickLauncher()
::execvp( "quicklauncher", args );
+ delete []args;
+ disabled = TRUE;
_exit( -1 );
@@ -673,3 +682,3 @@ void AppLauncher::processExited()
qDebug("Removing application %s", appName.latin1());
- runningAppsProc.remove(proc);
+ runningAppsProc.remove(proc);
@@ -701,3 +710,3 @@ void AppLauncher::processExited()
}
-
+
#endif