-rw-r--r-- | library/global.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/library/global.cpp b/library/global.cpp index 7438891..2e4d03f 100644 --- a/library/global.cpp +++ b/library/global.cpp | |||
@@ -551,32 +551,35 @@ void Global::terminate( const AppLnk* app ) | |||
551 | Low-level function to run command \a c. | 551 | Low-level function to run command \a c. |
552 | 552 | ||
553 | \warning Do not use this function. Use execute instead. | 553 | \warning Do not use this function. Use execute instead. |
554 | 554 | ||
555 | \sa execute() | 555 | \sa execute() |
556 | */ | 556 | */ |
557 | void Global::invoke(const QString &c) | 557 | void Global::invoke(const QString &c) |
558 | { | 558 | { |
559 | // Convert the command line in to a list of arguments | 559 | // Convert the command line in to a list of arguments |
560 | QStringList list = QStringList::split(QRegExp(" *"),c); | 560 | QStringList list = QStringList::split(QRegExp(" *"),c); |
561 | 561 | ||
562 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 562 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
563 | QString ap=list[0]; | 563 | QString ap=list[0]; |
564 | // see if the application is already running | 564 | // see if the application is already running |
565 | // XXX should lock file /tmp/qcop-msg-ap | 565 | // XXX should lock file /tmp/qcop-msg-ap |
566 | if ( QCopChannel::isRegistered( ("QPE/Application/" + ap).latin1() ) ) { | 566 | if ( QCopChannel::isRegistered( ("QPE/Application/" + ap).latin1() ) ) { |
567 | // If the channel is already register, the app is already running, so show it. | ||
568 | { QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); } | ||
569 | |||
567 | QCopEnvelope e("QPE/System", "notBusy(QString)" ); | 570 | QCopEnvelope e("QPE/System", "notBusy(QString)" ); |
568 | e << ap; | 571 | e << ap; |
569 | return; | 572 | return; |
570 | } | 573 | } |
571 | // XXX should unlock file /tmp/qcop-msg-ap | 574 | // XXX should unlock file /tmp/qcop-msg-ap |
572 | //see if it is being started | 575 | //see if it is being started |
573 | if ( StartingAppList::isStarting( ap ) ) { | 576 | if ( StartingAppList::isStarting( ap ) ) { |
574 | QCopEnvelope e("QPE/System", "notBusy(QString)" ); | 577 | QCopEnvelope e("QPE/System", "notBusy(QString)" ); |
575 | e << ap; | 578 | e << ap; |
576 | return; | 579 | return; |
577 | } | 580 | } |
578 | 581 | ||
579 | #endif | 582 | #endif |
580 | 583 | ||
581 | #ifdef QT_NO_QWS_MULTIPROCESS | 584 | #ifdef QT_NO_QWS_MULTIPROCESS |
582 | QMessageBox::warning( 0, "Error", "Could not find the application " + c, "Ok", 0, 0, 0, 1 ); | 585 | QMessageBox::warning( 0, "Error", "Could not find the application " + c, "Ok", 0, 0, 0, 1 ); |