-rw-r--r-- | core/launcher/applauncher.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/core/launcher/applauncher.cpp b/core/launcher/applauncher.cpp index 0db99dd..f161e98 100644 --- a/core/launcher/applauncher.cpp +++ b/core/launcher/applauncher.cpp | |||
@@ -24,13 +24,13 @@ | |||
24 | #ifndef QTOPIA_INTERNAL_FILEOPERATIONS | 24 | #ifndef QTOPIA_INTERNAL_FILEOPERATIONS |
25 | #define QTOPIA_INTERNAL_FILEOPERATIONS | 25 | #define QTOPIA_INTERNAL_FILEOPERATIONS |
26 | #endif | 26 | #endif |
27 | #ifndef QTOPIA_PROGRAM_MONITOR | 27 | #ifndef QTOPIA_PROGRAM_MONITOR |
28 | #define QTOPIA_PROGRAM_MONITOR | 28 | #define QTOPIA_PROGRAM_MONITOR |
29 | #endif | 29 | #endif |
30 | #include <qtopia/global.h> | 30 | #include <opie2/oglobal.h> |
31 | 31 | ||
32 | #ifndef Q_OS_WIN32 | 32 | #ifndef Q_OS_WIN32 |
33 | #include <sys/stat.h> | 33 | #include <sys/stat.h> |
34 | #include <sys/wait.h> | 34 | #include <sys/wait.h> |
35 | #include <sys/file.h> | 35 | #include <sys/file.h> |
36 | #include <unistd.h> | 36 | #include <unistd.h> |
@@ -58,13 +58,12 @@ | |||
58 | #include <qtopia/qpeapplication.h> | 58 | #include <qtopia/qpeapplication.h> |
59 | #include <qtopia/config.h> | 59 | #include <qtopia/config.h> |
60 | #include <qtopia/global.h> | 60 | #include <qtopia/global.h> |
61 | 61 | ||
62 | #include "applauncher.h" | 62 | #include "applauncher.h" |
63 | #include "documentlist.h" | 63 | #include "documentlist.h" |
64 | #include "launcherglobal.h" | ||
65 | 64 | ||
66 | const int AppLauncher::RAISE_TIMEOUT_MS = 5000; | 65 | const int AppLauncher::RAISE_TIMEOUT_MS = 5000; |
67 | 66 | ||
68 | //--------------------------------------------------------------------------- | 67 | //--------------------------------------------------------------------------- |
69 | 68 | ||
70 | static AppLauncher* appLauncherPtr; | 69 | static AppLauncher* appLauncherPtr; |
@@ -401,13 +400,13 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus) | |||
401 | QString str = tr("<qt><b>%1</b> was terminated due to signal code %2</qt>").arg( app->name() ).arg( sig ); | 400 | QString str = tr("<qt><b>%1</b> was terminated due to signal code %2</qt>").arg( app->name() ).arg( sig ); |
402 | QMessageBox::information(0, tr("Application terminated"), str ); | 401 | QMessageBox::information(0, tr("Application terminated"), str ); |
403 | } else { | 402 | } else { |
404 | if ( exitStatus == 255 ) { //could not find app (because global returns -1) | 403 | if ( exitStatus == 255 ) { //could not find app (because global returns -1) |
405 | QMessageBox::information(0, tr("Application not found"), tr("<qt>Could not locate application <b>%1</b></qt>").arg( app->exec() ) ); | 404 | QMessageBox::information(0, tr("Application not found"), tr("<qt>Could not locate application <b>%1</b></qt>").arg( app->exec() ) ); |
406 | } else { | 405 | } else { |
407 | QFileInfo fi(Opie::Global::tempDir() + "qcop-msg-" + appName); | 406 | QFileInfo fi(OGlobal::tempDirPath() + "qcop-msg-" + appName); |
408 | if ( fi.exists() && fi.size() ) { | 407 | if ( fi.exists() && fi.size() ) { |
409 | emit terminated(sigPid, appName); | 408 | emit terminated(sigPid, appName); |
410 | qWarning("Re executing obmitted for %s", appName.latin1() ); | 409 | qWarning("Re executing obmitted for %s", appName.latin1() ); |
411 | // execute( appName, QString::null ); | 410 | // execute( appName, QString::null ); |
412 | return; | 411 | return; |
413 | } | 412 | } |
@@ -443,14 +442,14 @@ bool AppLauncher::isRunning(const QString &app) | |||
443 | 442 | ||
444 | return FALSE; | 443 | return FALSE; |
445 | } | 444 | } |
446 | 445 | ||
447 | bool AppLauncher::executeBuiltin(const QString &c, const QString &document) | 446 | bool AppLauncher::executeBuiltin(const QString &c, const QString &document) |
448 | { | 447 | { |
449 | Global::Command* builtin = Opie::Global::builtinCommands(); | 448 | Global::Command* builtin = OGlobal::builtinCommands(); |
450 | QGuardedPtr<QWidget> *running = Opie::Global::builtinRunning(); | 449 | QGuardedPtr<QWidget> *running = OGlobal::builtinRunning(); |
451 | 450 | ||
452 | // Attempt to execute the app using a builtin class for the app | 451 | // Attempt to execute the app using a builtin class for the app |
453 | if (builtin) { | 452 | if (builtin) { |
454 | for (int i = 0; builtin[i].file; i++) { | 453 | for (int i = 0; builtin[i].file; i++) { |
455 | if ( builtin[i].file == c ) { | 454 | if ( builtin[i].file == c ) { |
456 | if ( running[i] ) { | 455 | if ( running[i] ) { |
@@ -494,13 +493,13 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais | |||
494 | QString appName = list[0]; | 493 | QString appName = list[0]; |
495 | if ( isRunning(appName) ) { | 494 | if ( isRunning(appName) ) { |
496 | QCString channel = "QPE/Application/"; | 495 | QCString channel = "QPE/Application/"; |
497 | channel += appName.latin1(); | 496 | channel += appName.latin1(); |
498 | 497 | ||
499 | // Need to lock it to avoid race conditions with QPEApplication::processQCopFile | 498 | // Need to lock it to avoid race conditions with QPEApplication::processQCopFile |
500 | QFile f(Opie::Global::tempDir() + "qcop-msg-" + appName); | 499 | QFile f(OGlobal::tempDirPath() + "qcop-msg-" + appName); |
501 | if ( !noRaise && f.open(IO_WriteOnly | IO_Append) ) { | 500 | if ( !noRaise && f.open(IO_WriteOnly | IO_Append) ) { |
502 | #ifndef Q_OS_WIN32 | 501 | #ifndef Q_OS_WIN32 |
503 | flock(f.handle(), LOCK_EX); | 502 | flock(f.handle(), LOCK_EX); |
504 | #endif | 503 | #endif |
505 | 504 | ||
506 | QDataStream ds(&f); | 505 | QDataStream ds(&f); |