summaryrefslogtreecommitdiff
path: root/core/launcher
Side-by-side diff
Diffstat (limited to 'core/launcher') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/applauncher.cpp23
1 files changed, 16 insertions, 7 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
@@ -26,9 +26,9 @@
#endif
#ifndef QTOPIA_PROGRAM_MONITOR
#define QTOPIA_PROGRAM_MONITOR
#endif
-#include <qtopia/qpeglobal.h>
+#include <qtopia/global.h>
#ifndef Q_OS_WIN32
#include <sys/stat.h>
#include <sys/wait.h>
@@ -60,8 +60,9 @@
#include <qtopia/global.h>
#include "applauncher.h"
#include "documentlist.h"
+#include "launcherglobal.h"
const int AppLauncher::RAISE_TIMEOUT_MS = 5000;
//---------------------------------------------------------------------------
@@ -402,12 +403,13 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
} else {
if ( exitStatus == 255 ) { //could not find app (because global returns -1)
QMessageBox::information(0, tr("Application not found"), tr("<qt>Could not locate application <b>%1</b></qt>").arg( app->exec() ) );
} 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;
}
}
}
@@ -443,10 +445,10 @@ bool AppLauncher::isRunning(const QString &app)
}
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
if (builtin) {
for (int i = 0; builtin[i].file; i++) {
@@ -482,8 +484,9 @@ bool AppLauncher::executeBuiltin(const QString &c, const QString &document)
}
bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRaise)
{
+ qWarning("AppLauncher::execute");
// Convert the command line in to a list of arguments
QStringList list = QStringList::split(QRegExp(" *"),c);
if ( !docParam.isEmpty() )
list.append( docParam );
@@ -493,9 +496,9 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
QCString channel = "QPE/Application/";
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) ) {
#ifndef Q_OS_WIN32
flock(f.handle(), LOCK_EX);
#endif
@@ -527,9 +530,9 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
return TRUE;
}
#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 );
#else
QStrList slist;
@@ -634,8 +637,12 @@ int AppLauncher::pidForName( const QString &appName )
}
void AppLauncher::createQuickLauncher()
{
+ static bool disabled = FALSE;
+ if (disabled)
+ return;
+
qlReady = FALSE;
qlPid = ::vfork();
if ( !qlPid ) {
char **args = new char *[2];
@@ -647,8 +654,10 @@ void AppLauncher::createQuickLauncher()
// Try bindir first, so that foo/bar works too
setenv( "LD_BIND_NOW", "1", 1 );
::execv( QPEApplication::qpeDir()+"bin/quicklauncher", args );
::execvp( "quicklauncher", args );
+ delete []args;
+ disabled = TRUE;
_exit( -1 );
} else if ( qlPid == -1 ) {
qlPid = 0;
} else {