From 0655456f68849bfad9019a7760dec961792d7519 Mon Sep 17 00:00:00 2001 From: zecke Date: Thu, 17 Oct 2002 16:45:38 +0000 Subject: Move around some #ifdefs to be able to be built with Qt2/X11 --- diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index d74b745..1fd3f6a 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -152,7 +152,6 @@ void DesktopPowerAlerter::hideEvent( QHideEvent *e ) currentPriority = INT_MAX; } - class QPEScreenSaver : public QWSScreenSaver { private: @@ -325,7 +324,6 @@ private: bool m_backlight_forcedoff; }; - void DesktopApplication::switchLCD ( bool on ) { if ( qApp ) { @@ -642,7 +640,7 @@ Desktop::Desktop() : connect( qApp, SIGNAL( volumeChanged( bool ) ), this, SLOT( rereadVolumes() ) ); qApp->installEventFilter( this ); - + qApp-> setMainWidget ( launcher ); } @@ -709,23 +707,27 @@ void Desktop::checkMemory() static bool isVisibleWindow( int wid ) { +#ifdef QWS const QList &list = qwsServer->clientWindows(); QWSWindow* w; for ( QListIterator it( list ); ( w = it.current() ); ++it ) { if ( w->winId() == wid ) return !w->isFullyObscured(); } +#endif return FALSE; } static bool hasVisibleWindow( const QString& clientname ) { +#ifdef QWS const QList &list = qwsServer->clientWindows(); QWSWindow* w; for ( QListIterator it( list ); ( w = it.current() ); ++it ) { if ( w->client() ->identity() == clientname && !w->isFullyObscured() ) return TRUE; } +#endif return FALSE; } @@ -745,7 +747,7 @@ void Desktop::raiseLauncher() } void Desktop::home ( ) -{ +{ if ( isVisibleWindow( launcher->winId() ) ) launcher->nextView(); else diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 66cc3e6..a5955a4 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -22,9 +22,7 @@ // have this class. #define QTOPIA_INTERNAL_FSLP -#ifdef QWS #include -#endif #include #include #include diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index 073e19a..762a596 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -53,7 +54,7 @@ void initEnvironment() config.setGroup( "Location" ); QString tz = config.readEntry( "Timezone", getenv("TZ") ); - // if not timezone set, pick New York + // if not timezone set, pick New York if (tz.isNull()) tz = "America/New_York"; @@ -129,7 +130,7 @@ static const char *pidfile_path = "/var/run/opie.pid"; void create_pidfile ( ) { FILE *f; - + if (( f = ::fopen ( pidfile_path, "w" ))) { ::fprintf ( f, "%d", getpid ( )); ::fclose ( f ); @@ -156,7 +157,7 @@ int main( int argc, char ** argv ) ::setsid ( ); ::setpgid ( 0, 0 ); - + ::atexit ( remove_pidfile ); create_pidfile ( ); diff --git a/core/launcher/qcopbridge.cpp b/core/launcher/qcopbridge.cpp index 85993ee..6177a7c 100644 --- a/core/launcher/qcopbridge.cpp +++ b/core/launcher/qcopbridge.cpp @@ -21,9 +21,7 @@ #include "qcopbridge.h" #include "transferserver.h" -#ifdef QWS #include -#endif #include #include diff --git a/core/launcher/runningappbar.cpp b/core/launcher/runningappbar.cpp index b830d1b..c8f45d5 100644 --- a/core/launcher/runningappbar.cpp +++ b/core/launcher/runningappbar.cpp @@ -44,8 +44,10 @@ RunningAppBar::RunningAppBar(QWidget* parent) m_AppLnkSet = new AppLnkSet( QPEApplication::qpeDir() + "apps" ); +#ifdef QWS connect(qwsServer, SIGNAL(newChannel(const QString&)), this, SLOT(newQcopChannel(const QString&))); connect(qwsServer, SIGNAL(removedChannel(const QString&)), this, SLOT(removedQcopChannel(const QString&))); +#endif QCopChannel* channel = new QCopChannel( "QPE/System", this ); connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(received(const QCString&, const QByteArray&)) ); diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp index d2f5501..dea140d 100644 --- a/core/launcher/transferserver.cpp +++ b/core/launcher/transferserver.cpp @@ -56,9 +56,7 @@ extern "C" { #include #include #include -#ifdef QWS #include -#endif #include "transferserver.h" #include "qprocess.h" -- cgit v0.9.0.2