author | zecke <zecke> | 2002-10-16 01:09:22 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-16 01:09:22 (UTC) |
commit | 543e54de7170c606b6883ac4152567e7faf13182 (patch) (side-by-side diff) | |
tree | 8a7d623e96cab0135a2f7cb11aa9f7491bfda9a2 | |
parent | 3e973543b77631d053a9616b5540966dbe51ab47 (diff) | |
download | opie-543e54de7170c606b6883ac4152567e7faf13182.zip opie-543e54de7170c606b6883ac4152567e7faf13182.tar.gz opie-543e54de7170c606b6883ac4152567e7faf13182.tar.bz2 |
Remove #ifdef QWS HELL
a Platform which is not supporting IPC compatible
to QCopChannel/Envelope is not of much use nowadays..
so be sure your platform is supporting it
-rw-r--r-- | library/alarmserver.cpp | 2 | ||||
-rw-r--r-- | library/applnk.cpp | 4 | ||||
-rw-r--r-- | library/fileselector.cpp | 2 | ||||
-rw-r--r-- | library/fontdatabase.cpp | 2 | ||||
-rw-r--r-- | library/fontmanager.cpp | 2 | ||||
-rw-r--r-- | library/global.cpp | 28 | ||||
-rw-r--r-- | library/ir.cpp | 2 | ||||
-rw-r--r-- | library/lnkproperties.cpp | 2 | ||||
-rw-r--r-- | library/network.cpp | 2 | ||||
-rw-r--r-- | library/networkinterface.cpp | 2 | ||||
-rw-r--r-- | library/password.cpp | 2 | ||||
-rw-r--r-- | library/qpedecoration_qws.cpp | 2 | ||||
-rw-r--r-- | library/tzselect.cpp | 4 |
13 files changed, 11 insertions, 45 deletions
diff --git a/library/alarmserver.cpp b/library/alarmserver.cpp index 177a0cb..02bca3d 100644 --- a/library/alarmserver.cpp +++ b/library/alarmserver.cpp @@ -19,27 +19,25 @@ **********************************************************************/ #include <qdir.h> #include <qfile.h> #include <qmessagebox.h> #include <qtextstream.h> #include <qpe/qpeapplication.h> #include "global.h" #include "resource.h" -#if defined(Q_WS_QWS) && !defined(QT_NO_COP) #include <qpe/qcopenvelope_qws.h> -#endif #include "alarmserver.h" #include <qpe/timeconversion.h> #include <sys/types.h> #include <sys/stat.h> #include <stdlib.h> #include <unistd.h> struct timerEventItem { time_t UTCtime; QCString channel, message; diff --git a/library/applnk.cpp b/library/applnk.cpp index a56da5d..5763c62 100644 --- a/library/applnk.cpp +++ b/library/applnk.cpp @@ -18,40 +18,36 @@ ** **********************************************************************/ #define QTOPIA_INTERNAL_MIMEEXT #define QTOPIA_INTERNAL_PRELOADACCESS #define QTOPIA_INTERNAL_APPLNKASSIGN #include "applnk.h" #include <qpe/qpeapplication.h> #include <qpe/categories.h> #include <qpe/categoryselect.h> -#ifdef QWS #include <qpe/qcopenvelope_qws.h> -#endif #include <qpe/global.h> #include <qpe/mimetype.h> #include <qpe/config.h> #include <qpe/storage.h> #include <qpe/resource.h> #include <qdict.h> #include <qdir.h> #include <qregexp.h> -#ifdef Q_WS_QWS #include <qgfx_qws.h> -#endif #include <stdlib.h> int AppLnk::lastId = 5000; static int smallSize = 14; static int bigSize = 32; static QString safeFileName(const QString& n) { QString safename=n; safename.replace(QRegExp("[^0-9A-Za-z.]"),"_"); diff --git a/library/fileselector.cpp b/library/fileselector.cpp index 052a29e..4039243 100644 --- a/library/fileselector.cpp +++ b/library/fileselector.cpp @@ -21,27 +21,25 @@ // WARNING: Do *NOT* define this yourself. The SL5xxx from SHARP does NOT // have this class. #define QTOPIA_INTERNAL_FSLP #include "fileselector.h" #include "fileselector_p.h" #include "global.h" #include "resource.h" #include "config.h" #include "applnk.h" #include "storage.h" #include "qpemenubar.h" -#ifdef QWS #include <qcopchannel_qws.h> -#endif #include "lnkproperties.h" #include "applnk.h" #include <qpe/qpeapplication.h> #include "categorymenu.h" #include "categoryselect.h" #include "mimetype.h" #include <qpe/categories.h> #include <stdlib.h> #include <qdir.h> #include <qwidget.h> diff --git a/library/fontdatabase.cpp b/library/fontdatabase.cpp index 2b5e0d2..147134c 100644 --- a/library/fontdatabase.cpp +++ b/library/fontdatabase.cpp @@ -15,27 +15,25 @@ ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include <qpe/qpeapplication.h> #include "fontfactoryinterface.h" #include "fontdatabase.h" #include <qpe/qlibrary.h> -#ifdef QWS #include <qfontmanager_qws.h> -#endif #include <qdir.h> #include <qdict.h> #include <stdio.h> #include <stdlib.h> static QString fontDir() { QString qtdir = getenv("QTDIR"); if ( qtdir.isEmpty() ) qtdir = "/usr/local/qt-embedded"; return qtdir+"/lib/fonts/"; } diff --git a/library/fontmanager.cpp b/library/fontmanager.cpp index 28a5212..c854133 100644 --- a/library/fontmanager.cpp +++ b/library/fontmanager.cpp @@ -9,25 +9,24 @@ ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ -#ifdef QWS #include "fontmanager.h" #include <qfile.h> #include <stdlib.h> #include <qgfx_qws.h> /* QFontInfo doesn't work in QWS at the moment, otherwise we would just have used that to check the real values @@ -91,13 +90,12 @@ QFont FontManager::unicodeFont( Spacing sp ) key = "cyberbit_120_50"; if ( QFile::exists(fontDir+key+suffix) ) { fontName = "Cyberbit"; size = 12; } else { fontName = "Helvetica"; size = 14; } } } return QFont(fontName,size); } -#endif diff --git a/library/global.cpp b/library/global.cpp index 9b908bf..d02e711 100644 --- a/library/global.cpp +++ b/library/global.cpp @@ -16,47 +16,43 @@ ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #define QTOPIA_INTERNAL_LANGLIST #include <qpe/qpedebug.h> #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> #include <qdir.h> #include <qmessagebox.h> #include <qregexp.h> #include <stdlib.h> #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 bool checkStorage(const QString &path ){ // this is a small Config replacement cause config is too limited -zecke QFile file(path ); if(!file.open(IO_ReadOnly ) ) return true; QByteArray array = file.readAll(); @@ -101,31 +97,29 @@ private slots: private: StartingAppList( QObject *parent=0, const char* name=0 ) ; QDict<QTime> dict; static StartingAppList *appl; }; 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 ) appl = new StartingAppList; QTime *t = new QTime; t->start(); appl->dict.insert( "QPE/Application/" + name, t ); #endif } @@ -384,92 +378,92 @@ void Global::createDocDir() docDirCreated = TRUE; mkdir( QPEApplication::documentDir().latin1(), 0755 ); } } /*! 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; } /*! Explicitly show the current input method. Input methods are indicated in the taskbar by a small icon. If the input method is activated (shown) then it takes up some proportion of the bottom of the screen, to allow the user to interact (input 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. The current input method is still indicated in the taskbar, but no 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 } /*! \internal */ bool Global::isBuiltinCommand( const QString &name ) { if(!builtin) return FALSE; // yes, it can happen @@ -550,25 +544,25 @@ void Global::terminate( const AppLnk* app ) /*! Low-level function to run command \a c. \warning Do not use this function. Use execute instead. \sa execute() */ 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()" ); } QCopEnvelope e("QPE/System", "notBusy(QString)" ); e << ap; return; } // XXX should unlock file /tmp/qcop-msg-ap @@ -586,25 +580,25 @@ void Global::invoke(const QString &c) #else QStrList slist; unsigned int j; for ( j = 0; j < list.count(); j++ ) slist.append( list[j].utf8() ); 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 QString libexe = qpeDir()+"/binlib/lib"+args[0] + ".so"; qDebug("libfile = %s", libexe.latin1() ); if ( QFile::exists( libexe ) ) { qDebug("calling quickexec %s", libexe.latin1() ); quickexecv( libexe.utf8().data(), (const char **)args ); } else @@ -627,25 +621,25 @@ void Global::invoke(const QString &c) /*! Executes the application identfied by \a c, passing \a document if it isn't null. Note that a better approach might be to send a QCop message to the 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; } #endif return; } // Attempt to execute the app using a builtin class for the app first @@ -667,25 +661,25 @@ void Global::execute( const QString &c, const QString& document ) 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(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 */ invoke( ap ); //{ QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); } if ( !document.isEmpty() ) { QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "setDocument(QString)" ); env << document; } diff --git a/library/ir.cpp b/library/ir.cpp index a7cf7b1..b5b726d 100644 --- a/library/ir.cpp +++ b/library/ir.cpp @@ -12,28 +12,26 @@ ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "ir.h" #include <qstring.h> -#ifdef QWS #include "qcopenvelope_qws.h" #include <qcopchannel_qws.h> -#endif #include "applnk.h" /*! \class Ir ir.h \brief The Ir class implements basic support for sending objects over an infrared communication link. Both \link doclnk.html DocLnk\endlink objects and files can be sent to another device via the infrared link using the send() function. When the send has completed the done() signal is emitted. diff --git a/library/lnkproperties.cpp b/library/lnkproperties.cpp index 0b50bae..50cf5af 100644 --- a/library/lnkproperties.cpp +++ b/library/lnkproperties.cpp @@ -21,27 +21,25 @@ // WARNING: Do *NOT* define this yourself. The SL5xxx from SHARP does NOT // have this class. #define QTOPIA_INTERNAL_FSLP #include "lnkproperties.h" #include "lnkproperties.h" #include "lnkpropertiesbase_p.h" #include "ir.h" #include <qpe/qpeapplication.h> #include <qpe/applnk.h> #include <qpe/global.h> #include <qpe/categorywidget.h> -#ifdef QWS #include <qpe/qcopenvelope_qws.h> -#endif #include <qpe/filemanager.h> #include <qpe/config.h> #include <qpe/storage.h> #include <qpe/qpemessagebox.h> #include <qpe/mimetype.h> #include <qlineedit.h> #include <qtoolbutton.h> #include <qpushbutton.h> #include <qgroupbox.h> #include <qcheckbox.h> #include <qlabel.h> diff --git a/library/network.cpp b/library/network.cpp index 185b147..3568809 100644 --- a/library/network.cpp +++ b/library/network.cpp @@ -16,27 +16,25 @@ ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #define QTOPIA_INTERNAL_LANGLIST #include "qpe/network.h" #include "qpe/networkinterface.h" #include "qpe/global.h" #include "qpe/config.h" #include "qpe/resource.h" #include "qpe/qpeapplication.h" -#ifdef QWS #include <qpe/qcopenvelope_qws.h> -#endif #include <qpe/qlibrary.h> #include <qlistbox.h> #include <qdir.h> #include <qlayout.h> #include <qdict.h> #include <qtranslator.h> #include <stdlib.h> #ifndef QT_NO_COP class NetworkEmitter : public QCopChannel { diff --git a/library/networkinterface.cpp b/library/networkinterface.cpp index 2b5c77e..0ba773a 100644 --- a/library/networkinterface.cpp +++ b/library/networkinterface.cpp @@ -36,27 +36,25 @@ bool NetworkInterface::isActive( Config& cfg ) const QString dev0 = dev+'0'; FILE* f; f = fopen("/proc/net/dev", "r"); if ( f ) { char line[1024]; char devname[80]; while ( fgets( line, 1024, f ) ) { if ( sscanf(line," %[^:]:", devname)==1 ) { if ( devname == dev || devname == dev0 ) { fclose(f); -#ifdef QWS Network::writeProxySettings( cfg ); -#endif return TRUE; } } } fclose(f); } return FALSE; } QString NetworkInterface::cardType( Config& cfg ) const { return cfg.readEntry("CardType"); diff --git a/library/password.cpp b/library/password.cpp index 41b3358..4b22b65 100644 --- a/library/password.cpp +++ b/library/password.cpp @@ -18,27 +18,25 @@ ** **********************************************************************/ #include "password.h" #include "config.h" #include "global.h" #include "backend/contact.h" #include <qlabel.h> #include <qlineedit.h> #include <qtextview.h> #include <qstring.h> #include <qapplication.h> #include <qfile.h> -#ifdef QWS #include <qwindowsystem_qws.h> -#endif #include <qdialog.h> #include <unistd.h> //for sleep #include "passwordbase_p.h" class PasswordDialog : public PasswordBase { Q_OBJECT public: PasswordDialog( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); diff --git a/library/qpedecoration_qws.cpp b/library/qpedecoration_qws.cpp index 214c721..9cbe92b 100644 --- a/library/qpedecoration_qws.cpp +++ b/library/qpedecoration_qws.cpp @@ -8,25 +8,24 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ -#ifdef QWS #define QTOPIA_INTERNAL_LANGLIST #include <qapplication.h> #include <qstyle.h> #include <qwidget.h> #include <qpainter.h> #include <qtimer.h> #include <qwhatsthis.h> #include "qcopenvelope_qws.h" #include "qpedecoration_qws.h" #include <qdialog.h> #include <qdrawutil.h> #include <qgfx_qws.h> @@ -902,13 +901,12 @@ void QPEDecoration::windowData( const QWidget *w, WindowDecorationInterface::Win #ifndef QT_NO_POPUPMENU QPopupMenu *QPEDecoration::menu(QWSManager*, const QWidget*, const QPoint&) { return 0; } #endif */ #endif // QT_NO_QWS_QPE_WM_STYLE -#endif diff --git a/library/tzselect.cpp b/library/tzselect.cpp index 9436867..2e5a433 100644 --- a/library/tzselect.cpp +++ b/library/tzselect.cpp @@ -19,27 +19,25 @@ **********************************************************************/ #define QTOPIA_INTERNAL_TZSELECT_INC_LOCAL #include "tzselect.h" #include "resource.h" #include "global.h" #include "config.h" #include <qtoolbutton.h> #include <qfile.h> #include <stdlib.h> -#ifdef Q_WS_QWS #include <qcopchannel_qws.h> -#endif class TimeZoneSelectorPrivate { public: TimeZoneSelectorPrivate() : includeLocal(FALSE) {} bool includeLocal; }; TZCombo::TZCombo( QWidget *p, const char* n ) : QComboBox( p, n ) { updateZones(); @@ -59,31 +57,29 @@ TZCombo::TZCombo( QWidget *p, const char* n ) if ( *it == tz ) index = n; n++; } setCurrentItem(index); } else { setCurrentItem(0); } // listen on QPE/System -#if defined(Q_WS_QWS) #if !defined(QT_NO_COP) QCopChannel *channel = new QCopChannel( "QPE/System", this ); connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(handleSystemChannel(const QCString&, const QByteArray&)) ); #endif -#endif } TZCombo::~TZCombo() { } void TZCombo::updateZones() { QString cur = currentText(); clear(); |