author | zecke <zecke> | 2002-10-18 01:46:28 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-18 01:46:28 (UTC) |
commit | 218bc4583c545db50f3475930d61b1c76aca3fbd (patch) (side-by-side diff) | |
tree | 5ddd0dbca5a42d3f00914968150147c85b4da837 | |
parent | 0457c48c165abef8afa2ac73c8f66d20e289681a (diff) | |
download | opie-218bc4583c545db50f3475930d61b1c76aca3fbd.zip opie-218bc4583c545db50f3475930d61b1c76aca3fbd.tar.gz opie-218bc4583c545db50f3475930d61b1c76aca3fbd.tar.bz2 |
Remove some more #ifdefs
-rw-r--r-- | core/launcher/desktop.cpp | 4 | ||||
-rw-r--r-- | core/launcher/launcher.cpp | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index 1fd3f6a..3546e28 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -354,98 +354,94 @@ DesktopApplication::DesktopApplication( int& argc, char **argv, Type appType ) channel = new QCopChannel( "QPE/Desktop", this ); connect( channel, SIGNAL( received( const QCString&, const QByteArray& ) ), this, SLOT( desktopMessage( const QCString&, const QByteArray& ) ) ); channel = new QCopChannel( "QPE/System", this ); connect( channel, SIGNAL( received( const QCString&, const QByteArray& ) ), this, SLOT( systemMessage( const QCString&, const QByteArray& ) ) ); m_screensaver = new QPEScreenSaver; m_screensaver-> setInterval ( -1 ); QWSServer::setScreenSaver( m_screensaver ); } DesktopApplication::~DesktopApplication() { delete ps; delete pa; } void DesktopApplication::desktopMessage( const QCString &msg, const QByteArray &data ) { -#ifdef Q_WS_QWS QDataStream stream( data, IO_ReadOnly ); if ( msg == "keyRegister(int key, QString channel, QString message)" ) { int k; QString c, m; stream >> k; stream >> c; stream >> m; qWarning( "KeyRegisterReceived: %i, %s, %s", k, ( const char* ) c, ( const char * ) m ); keyRegisterList.append( QCopKeyRegister( k, c, m ) ); } -#endif } void DesktopApplication::systemMessage( const QCString & msg, const QByteArray & data ) { -#ifdef Q_WS_QWS QDataStream stream ( data, IO_ReadOnly ); if ( msg == "setScreenSaverInterval(int)" ) { int time; stream >> time; m_screensaver-> setInterval( time ); } else if ( msg == "setScreenSaverIntervals(int,int,int)" ) { int t1, t2, t3; stream >> t1 >> t2 >> t3; m_screensaver-> setIntervals( t1, t2, t3 ); } else if ( msg == "setBacklight(int)" ) { int bright; stream >> bright; m_screensaver-> setBacklight( bright ); } else if ( msg == "setScreenSaverMode(int)" ) { int mode; stream >> mode; m_screensaver-> setMode ( mode ); } else if ( msg == "setDisplayState(int)" ) { int state; stream >> state; m_screensaver-> setDisplayState ( state != 0 ); } else if ( msg == "suspend()" ) { emit power(); } -#endif } enum MemState { Unknown, VeryLow, Low, Normal } memstate = Unknown; #ifdef Q_WS_QWS bool DesktopApplication::qwsEventFilter( QWSEvent *e ) { qpedesktop->checkMemory(); if ( e->type == QWSEvent::Key ) { QWSKeyEvent * ke = ( QWSKeyEvent * ) e; if ( !loggedin && ke->simpleData.keycode != Key_F34 ) return TRUE; bool press = ke->simpleData.is_press; bool autoRepeat = ke->simpleData.is_auto_repeat; /* app that registers key/message to be sent back to the app, when it doesn't have focus, when user presses key, unless keyboard has been requested from app. will not send multiple repeats if user holds key i.e. one shot */ if ( !keyRegisterList.isEmpty() && ke->simpleData.keycode !=0 && press) { // qDebug("<<<<<<<<<<<<<keycode %d", ke->simpleData.keycode); diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index a5955a4..5a9ee1b 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -603,49 +603,49 @@ Launcher::Launcher( QWidget* parent, const char* name, WFlags fl ) syncDialog = 0; // we have a pretty good idea how big we'll be setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() ); tabs = 0; rootFolder = 0; docsFolder = 0; int stamp = uidgen.generate(); // this is our timestamp to see which devices we know //uidgen.store( stamp ); m_timeStamp = QString::number( stamp ); tabs = new CategoryTabWidget( this ); tabs->setMaximumWidth( qApp->desktop()->width() ); setCentralWidget( tabs ); connect( tabs, SIGNAL(selected(const QString&)), this, SLOT(viewSelected(const QString&)) ); connect( tabs, SIGNAL(clicked(const AppLnk*)), this, SLOT(select(const AppLnk*))); connect( tabs, SIGNAL(rightPressed(AppLnk*)), this, SLOT(properties(AppLnk*))); -#if defined(Q_WS_QWS) && !defined(QT_NO_COP) +#if !defined(QT_NO_COP) QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); connect( sysChannel, SIGNAL(received(const QCString &, const QByteArray &)), this, SLOT(systemMessage( const QCString &, const QByteArray &)) ); QCopChannel *channel = new QCopChannel( "QPE/Launcher", this ); connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(launcherMessage(const QCString&, const QByteArray&)) ); #endif storage = new StorageInfo( this ); connect( storage, SIGNAL( disksChanged() ), SLOT( storageChanged() ) ); updateTabs(); preloadApps(); in_lnk_props = FALSE; got_lnk_change = FALSE; } Launcher::~Launcher() { delete rootFolder; delete docsFolder; } |