summaryrefslogtreecommitdiff
path: root/library/global.cpp
authorzecke <zecke>2003-08-25 14:46:43 (UTC)
committer zecke <zecke>2003-08-25 14:46:43 (UTC)
commit292b097e7db25dd231381c5b09307a1fbe81a492 (patch) (side-by-side diff)
treeb103c6c5e15e784dc07af55539672a72559da821 /library/global.cpp
parent5f292b6e4fc0f4ee8e4bced9a916f6bdce864b6b (diff)
downloadopie-292b097e7db25dd231381c5b09307a1fbe81a492.zip
opie-292b097e7db25dd231381c5b09307a1fbe81a492.tar.gz
opie-292b097e7db25dd231381c5b09307a1fbe81a492.tar.bz2
-instead of defining for an board we define now what this
boards need QPE_NEED_CALIBRATE -launcher is the only one executin application -allow processing of QCOPfiles after start ( qpeapplication ) -qcopenvelope no longer calls Global::execute
Diffstat (limited to 'library/global.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/global.cpp59
1 files changed, 7 insertions, 52 deletions
diff --git a/library/global.cpp b/library/global.cpp
index 189b830..5c89430 100644
--- a/library/global.cpp
+++ b/library/global.cpp
@@ -676,62 +676,17 @@ void Global::invoke(const QString &c)
*/
void Global::execute( const QString &c, const QString& document )
{
- if ( qApp->type() != QApplication::GuiServer ) {
// ask the server to do the work
#if !defined(QT_NO_COP)
- if ( document.isNull() ) {
- QCopEnvelope e( "QPE/System", "execute(QString)" );
- e << c;
- } else {
- QCopEnvelope e( "QPE/System", "execute(QString,QString)" );
- e << c << document;
- }
-#endif
- return;
- }
-
- // Attempt to execute the app using a builtin class for the app first
- // else try and find it in the bin directory
- if (builtin) {
- for (int i = 0; builtin[i].file; i++) {
- if ( builtin[i].file == c ) {
- if ( running[i] ) {
- if ( !document.isNull() && builtin[i].documentary )
- setDocument(running[i], document);
- running[i]->raise();
- running[i]->show();
- running[i]->setActiveWindow();
- } else {
- running[i] = builtin[i].func( builtin[i].maximized );
- }
-#ifndef QT_NO_COP
- QCopEnvelope e("QPE/System", "notBusy(QString)" );
- e << c; // that was quick ;-)
-#endif
- return;
- }
- }
- }
-
- //Global::invoke(c, document);
-
- // Convert the command line in to a list of arguments
- QStringList list = QStringList::split(QRegExp(" *"),c);
-
-#if !defined(QT_NO_COP)
- QString ap=list[0];
-
- qDebug("executing %s", ap.latin1() );
-
- /* if need be, sending a qcop message will result in an invoke, see
- preceeding function */
- invoke( ap );
- //{ QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); }
- if ( !document.isEmpty() ) {
- QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "setDocument(QString)" );
- env << document;
+ if ( document.isNull() ) {
+ QCopEnvelope e( "QPE/System", "execute(QString)" );
+ e << c;
+ } else {
+ QCopEnvelope e( "QPE/System", "execute(QString,QString)" );
+ e << c << document;
}
#endif
+ return;
}
/*!