summaryrefslogtreecommitdiff
path: root/library/global.cpp
Side-by-side diff
Diffstat (limited to 'library/global.cpp') (more/less context) (show whitespace changes)
-rw-r--r--library/global.cpp28
1 files changed, 11 insertions, 17 deletions
diff --git a/library/global.cpp b/library/global.cpp
index 9b908bf..d02e711 100644
--- a/library/global.cpp
+++ b/library/global.cpp
@@ -22,15 +22,13 @@
#include <qpe/global.h>
#include <qpe/qdawg.h>
#include <qpe/qpeapplication.h>
#include <qpe/resource.h>
#include <qpe/storage.h>
#include <qpe/applnk.h>
-#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
-#include "qpe/qcopenvelope_qws.h"
-#endif
+#include <qpe/qcopenvelope_qws.h>
#include <qfile.h>
#include <qlabel.h>
#include <qtimer.h>
#include <qmap.h>
#include <qdict.h>
@@ -42,15 +40,13 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
-#ifdef QWS
#include <qwindowsystem_qws.h> // for qwsServer
-#endif
#include <qdatetime.h>
#include <qfile.h>
namespace {
// checks if the storage should be searched
@@ -107,19 +103,17 @@ private:
StartingAppList* StartingAppList::appl = 0;
StartingAppList::StartingAppList( QObject *parent, const char* name )
:QObject( parent, name )
{
-#ifdef QWS
#if QT_VERSION >= 232 && !defined(QT_NO_COP)
connect( qwsServer, SIGNAL( newChannel(const QString&)),
this, SLOT( handleNewChannel(const QString&)) );
dict.setAutoDelete( TRUE );
#endif
-#endif
}
void StartingAppList::add( const QString& name )
{
#if QT_VERSION >= 232 && !defined(QT_NO_COP)
if ( !appl )
@@ -390,47 +384,47 @@ void Global::createDocDir()
/*!
Displays a status \a message to the user. This usually appears
in the taskbar for a short amount of time, then disappears.
*/
void Global::statusMessage(const QString& message)
{
-#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+#if!defined(QT_NO_COP)
QCopEnvelope e( "QPE/TaskBar", "message(QString)" );
e << message;
#endif
}
/*!
\internal
*/
void Global::applyStyle()
{
-#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+#if !defined(QT_NO_COP)
QCopChannel::send( "QPE/System", "applyStyle()" );
#else
((QPEApplication *)qApp)->applyStyle(); // apply without needing QCop for floppy version
#endif
}
/*!
\internal
*/
QWidget *Global::shutdown( bool )
{
-#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+#if !defined(QT_NO_COP)
QCopChannel::send( "QPE/System", "shutdown()" );
#endif
return 0;
}
/*!
\internal
*/
QWidget *Global::restart( bool )
{
-#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+#if !defined(QT_NO_COP)
QCopChannel::send( "QPE/System", "restart()" );
#endif
return 0;
}
/*!
@@ -442,13 +436,13 @@ QWidget *Global::restart( bool )
characters) with it.
\sa hideInputMethod()
*/
void Global::showInputMethod()
{
-#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+#if !defined(QT_NO_COP)
QCopChannel::send( "QPE/TaskBar", "showInputMethod()" );
#endif
}
/*!
Explicitly hide the current input method.
@@ -457,13 +451,13 @@ void Global::showInputMethod()
longer takes up screen space, and can no longer be interacted with.
\sa showInputMethod()
*/
void Global::hideInputMethod()
{
-#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+#if !defined(QT_NO_COP)
QCopChannel::send( "QPE/TaskBar", "hideInputMethod()" );
#endif
}
/*!
@@ -556,13 +550,13 @@ void Global::terminate( const AppLnk* app )
*/
void Global::invoke(const QString &c)
{
// Convert the command line in to a list of arguments
QStringList list = QStringList::split(QRegExp(" *"),c);
-#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+#if !defined(QT_NO_COP)
QString ap=list[0];
// see if the application is already running
// XXX should lock file /tmp/qcop-msg-ap
if ( QCopChannel::isRegistered( ("QPE/Application/" + ap).latin1() ) ) {
// If the channel is already register, the app is already running, so show it.
{ QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); }
@@ -592,13 +586,13 @@ void Global::invoke(const QString &c)
const char **args = new (const char *)[slist.count() + 1];
for ( j = 0; j < slist.count(); j++ )
args[j] = slist.at(j);
args[j] = NULL;
-#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+#if !defined(QT_NO_COP)
// an attempt to show a wait...
// more logic should be used, but this will be fine for the moment...
QCopEnvelope ( "QPE/System", "busy()" );
#endif
#ifdef HAVE_QUICKEXEC
@@ -633,13 +627,13 @@ void Global::invoke(const QString &c)
application's QPE/Application/\e{appname} channel.
*/
void Global::execute( const QString &c, const QString& document )
{
if ( qApp->type() != QApplication::GuiServer ) {
// ask the server to do the work
-#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+#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;
@@ -673,13 +667,13 @@ void Global::execute( const QString &c, const QString& document )
//Global::invoke(c, document);
// Convert the command line in to a list of arguments
QStringList list = QStringList::split(QRegExp(" *"),c);
-#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+#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 */