author | zecke <zecke> | 2003-04-16 10:57:59 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-04-16 10:57:59 (UTC) |
commit | eeb29547890a2d162de66d7d5b98d3840a7e2d79 (patch) (unidiff) | |
tree | 973c6de7aae2fd5ba368efb87fa24234f0e12aa3 /library/global.cpp | |
parent | dfa2d294b3af09bf3757a3c2294a925093e72fc6 (diff) | |
download | opie-eeb29547890a2d162de66d7d5b98d3840a7e2d79.zip opie-eeb29547890a2d162de66d7d5b98d3840a7e2d79.tar.gz opie-eeb29547890a2d162de66d7d5b98d3840a7e2d79.tar.bz2 |
Fix API docu
-rw-r--r-- | library/global.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/library/global.cpp b/library/global.cpp index 68a3a75..ce39751 100644 --- a/library/global.cpp +++ b/library/global.cpp | |||
@@ -111,5 +111,5 @@ StartingAppList::StartingAppList( QObject *parent, const char* name ) | |||
111 | connect( qwsServer, SIGNAL( newChannel(const QString&)), | 111 | connect( qwsServer, SIGNAL( newChannel(const QString&)), |
112 | this, SLOT( handleNewChannel(const QString&)) ); | 112 | this, SLOT( handleNewChannel(const QString&)) ); |
113 | #endif | 113 | #endif |
114 | dict.setAutoDelete( TRUE ); | 114 | dict.setAutoDelete( TRUE ); |
115 | } | 115 | } |
@@ -389,5 +389,5 @@ void Global::createDocDir() | |||
389 | void Global::statusMessage(const QString& message) | 389 | void Global::statusMessage(const QString& message) |
390 | { | 390 | { |
391 | #if!defined(QT_NO_COP) | 391 | #if !defined(QT_NO_COP) |
392 | QCopEnvelope e( "QPE/TaskBar", "message(QString)" ); | 392 | QCopEnvelope e( "QPE/TaskBar", "message(QString)" ); |
393 | e << message; | 393 | e << message; |
@@ -562,5 +562,5 @@ void Global::invoke(const QString &c) | |||
562 | // If the channel is already register, the app is already running, so show it. | 562 | // If the channel is already register, the app is already running, so show it. |
563 | { QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); } | 563 | { QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); } |
564 | 564 | ||
565 | QCopEnvelope e("QPE/System", "notBusy(QString)" ); | 565 | QCopEnvelope e("QPE/System", "notBusy(QString)" ); |
566 | e << ap; | 566 | e << ap; |
@@ -605,12 +605,12 @@ void Global::invoke(const QString &c) | |||
605 | } else | 605 | } else |
606 | #endif | 606 | #endif |
607 | { | 607 | { |
608 | bool success = false; | 608 | bool success = false; |
609 | int pfd [2]; | 609 | int pfd [2]; |
610 | if ( ::pipe ( pfd ) < 0 ) | 610 | if ( ::pipe ( pfd ) < 0 ) |
611 | pfd [0] = pfd [1] = -1; | 611 | pfd [0] = pfd [1] = -1; |
612 | 612 | ||
613 | pid_t pid = ::fork ( ); | 613 | pid_t pid = ::fork ( ); |
614 | 614 | ||
615 | if ( pid == 0 ) { // child | 615 | if ( pid == 0 ) { // child |
616 | for ( int fd = 3; fd < 100; fd++ ) { | 616 | for ( int fd = 3; fd < 100; fd++ ) { |
@@ -623,18 +623,18 @@ void Global::invoke(const QString &c) | |||
623 | if ( pfd [1] >= 0 ) | 623 | if ( pfd [1] >= 0 ) |
624 | ::fcntl ( pfd [1], F_SETFD, FD_CLOEXEC ); | 624 | ::fcntl ( pfd [1], F_SETFD, FD_CLOEXEC ); |
625 | 625 | ||
626 | // Try bindir first, so that foo/bar works too | 626 | // Try bindir first, so that foo/bar works too |
627 | ::execv ( qpeDir ( ) + "/bin/" + args [0], (char * const *) args ); | 627 | ::execv ( qpeDir ( ) + "/bin/" + args [0], (char * const *) args ); |
628 | ::execvp ( args [0], (char * const *) args ); | 628 | ::execvp ( args [0], (char * const *) args ); |
629 | 629 | ||
630 | char resultByte = 1; | 630 | char resultByte = 1; |
631 | if ( pfd [1] >= 0 ) | 631 | if ( pfd [1] >= 0 ) |
632 | ::write ( pfd [1], &resultByte, 1 ); | 632 | ::write ( pfd [1], &resultByte, 1 ); |
633 | ::_exit ( -1 ); | 633 | ::_exit ( -1 ); |
634 | } | 634 | } |
635 | else if ( pid > 0 ) { | 635 | else if ( pid > 0 ) { |
636 | success = true; | 636 | success = true; |
637 | 637 | ||
638 | if ( pfd [1] >= 0 ) | 638 | if ( pfd [1] >= 0 ) |
639 | ::close ( pfd [1] ); | 639 | ::close ( pfd [1] ); |
640 | if ( pfd [0] >= 0 ) { | 640 | if ( pfd [0] >= 0 ) { |
@@ -648,5 +648,5 @@ void Global::invoke(const QString &c) | |||
648 | if (( n == -1 ) && (( errno == ECHILD ) || ( errno == EINTR ))) | 648 | if (( n == -1 ) && (( errno == ECHILD ) || ( errno == EINTR ))) |
649 | continue; | 649 | continue; |
650 | 650 | ||
651 | break; // success | 651 | break; // success |
652 | } | 652 | } |
@@ -654,5 +654,5 @@ void Global::invoke(const QString &c) | |||
654 | } | 654 | } |
655 | } | 655 | } |
656 | if ( success ) | 656 | if ( success ) |
657 | StartingAppList::add( list[0] ); | 657 | StartingAppList::add( list[0] ); |
658 | else | 658 | else |