-rw-r--r-- | core/apps/calibrate/main.cpp | 2 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/TEWidget.cpp | 2 | ||||
-rw-r--r-- | core/launcher/desktop.cpp | 2 | ||||
-rw-r--r-- | core/launcher/main.cpp | 8 | ||||
-rw-r--r-- | core/launcher/taskbar.cpp | 4 | ||||
-rw-r--r-- | core/multimedia/opieplayer/loopcontrol_threaded.cpp | 2 | ||||
-rw-r--r-- | core/opie-login/main.cpp | 2 | ||||
-rw-r--r-- | library/power.cpp | 2 | ||||
-rw-r--r-- | library/qpeapplication.cpp | 2 | ||||
-rw-r--r-- | library/storage.cpp | 2 | ||||
-rw-r--r-- | mkspecs/qws/linux-sharp-g++/qmake.conf | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 6 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettings.cpp | 2 | ||||
-rw-r--r-- | noncore/tools/formatter/formatter.cpp | 4 | ||||
-rw-r--r-- | qt/qconfig-qpe.h | 2 | ||||
-rw-r--r-- | x11/libqpe-x11/qpe/qpeapplication.cpp | 2 |
16 files changed, 23 insertions, 23 deletions
diff --git a/core/apps/calibrate/main.cpp b/core/apps/calibrate/main.cpp index cb041c9..d1ad083 100644 --- a/core/apps/calibrate/main.cpp +++ b/core/apps/calibrate/main.cpp @@ -1,42 +1,42 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** 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. ** **********************************************************************/ #include "calibrate.h" #include <qfile.h> #include <qpe/qpeapplication.h> int main( int argc, char ** argv ) { QPEApplication a( argc, argv ); int retval = 0; -#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) +#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) if ( !QFile::exists( "/etc/pointercal" ) ) { // Make sure calibration widget starts on top. Calibrate *cal = new Calibrate; a.setMainWidget(cal); a.showMainWidget(cal); retval = a.exec(); delete cal; } #endif return retval; } diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp index 8214e7d..d0850e3 100644 --- a/core/apps/embeddedkonsole/TEWidget.cpp +++ b/core/apps/embeddedkonsole/TEWidget.cpp @@ -1065,97 +1065,97 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e ) // qDebug("key pressed 2 is 0x%x", ke->key()); emitText("\\"); // expose } else if( ke->state() == ControlButton && ke->key() == Key_V) { pasteClipboard(); } // else if( ke->state() == ControlButton && ke->key() == Key_C) { // pasteClipboard(); // } else emit keyPressedSignal(ke); // expose ke->accept(); #ifdef FAKE_CTRL_AND_ALT if ( dele ) delete e; #endif return true; // stop the event } if ( e->type() == QEvent::Enter ) { QObject::disconnect( (QObject*)cb, SIGNAL(dataChanged()), this, SLOT(onClearSelection()) ); } if ( e->type() == QEvent::Leave ) { QObject::connect( (QObject*)cb, SIGNAL(dataChanged()), this, SLOT(onClearSelection()) ); } return QFrame::eventFilter( obj, e ); } /* ------------------------------------------------------------------------- */ /* */ /* Frame */ /* */ /* ------------------------------------------------------------------------- */ void TEWidget::frameChanged() { propagateSize(); update(); } /* ------------------------------------------------------------------------- */ /* */ /* Sound */ /* */ /* ------------------------------------------------------------------------- */ void TEWidget::Bell() { -//#ifdef QT_QWS_SHARP +//#ifdef QT_QWS_SL5XXX //# ifndef QT_NO_COP if(useBeep) QCopEnvelope( "QPE/TaskBar", "soundAlarm()" ); //# endif //#else //# ifndef QT_NO_SOUND // QSound::play(Resource::findSound("alarm")); //# endif //#endif // QApplication::beep(); } /* ------------------------------------------------------------------------- */ /* */ /* Auxiluary */ /* */ /* ------------------------------------------------------------------------- */ void TEWidget::clearImage() // initialize the image // for internal use only { for (int y = 0; y < lines; y++) for (int x = 0; x < columns; x++) { image[loc(x,y)].c = 0xff; //' '; image[loc(x,y)].f = 0xff; //DEFAULT_FORE_COLOR; image[loc(x,y)].b = 0xff; //DEFAULT_BACK_COLOR; image[loc(x,y)].r = 0xff; //DEFAULT_RENDITION; } } // Create Image /////////////////////////////////////////////////////// void TEWidget::calcGeometry() { int showhscrollbar = 1; int hwidth = 0; int dcolumns; Config cfg("Konsole"); cfg.setGroup("ScrollBar"); useHorzScroll=cfg.readBoolEntry("HorzScroll",0); if(vcolumns == 0) showhscrollbar = 0; if(showhscrollbar == 1) hwidth = QApplication::style().scrollBarExtent().width(); diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index ba4fd66..59f2aea 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -1,93 +1,93 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** 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. ** **********************************************************************/ #include <syslog.h> #include "desktop.h" #include "info.h" #include "launcher.h" #include "qcopbridge.h" #include "shutdownimpl.h" #include "startmenu.h" #include "taskbar.h" #include "transferserver.h" #include "irserver.h" #include "packageslave.h" #include "screensaver.h" #include <qpe/applnk.h> #include <qpe/mimetype.h> #include <qpe/password.h> #include <qpe/config.h> #include <qpe/power.h> #include <qpe/timeconversion.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/network.h> #include <qpe/global.h> -#if defined( QT_QWS_SHARP ) || defined( QT_QWS_IPAQ ) +#if defined( QT_QWS_SL5XXX ) || defined( QT_QWS_IPAQ ) #include <qpe/custom.h> #endif #include <opie/odevice.h> #include <qgfx_qws.h> #include <qmainwindow.h> #include <qmessagebox.h> #include <qtimer.h> #include <qwindowsystem_qws.h> #include <qvaluelist.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> using namespace Opie; class QCopKeyRegister { public: QCopKeyRegister() : keyCode( 0 ) { } QCopKeyRegister( int k, const QCString &c, const QCString &m ) : keyCode( k ), channel( c ), message( m ) { } int getKeyCode() const { return keyCode; } QCString getChannel() const { return channel; } QCString getMessage() const { return message; } private: int keyCode; QCString channel, message; }; typedef QValueList<QCopKeyRegister> KeyRegisterList; diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index 49b41d6..8eaea17 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp @@ -1,153 +1,153 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** 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. ** **********************************************************************/ #include "desktop.h" #include "taskbar.h" #include "stabmon.h" #include <qpe/qpeapplication.h> #include <qpe/network.h> #include <qpe/config.h> -#if defined( QT_QWS_SHARP ) || defined( QT_QWS_IPAQ ) +#if defined( QT_QWS_SL5XXX ) || defined( QT_QWS_IPAQ ) #include <qpe/custom.h> #endif #include <opie/odevice.h> #include <qmessagebox.h> #include <qfile.h> #include <qimage.h> #include <qwindowsystem_qws.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/alarmserver.h> #include <stdlib.h> #include <stdio.h> #include <signal.h> #include <unistd.h> -#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) +#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) #include "../calibrate/calibrate.h" #endif using namespace Opie; void initEnvironment() { Config config("locale"); config.setGroup( "Location" ); QString tz = config.readEntry( "Timezone", getenv("TZ") ); // if not timezone set, pick New York if (tz.isNull()) tz = "America/New_York"; setenv( "TZ", tz, 1 ); config.writeEntry( "Timezone", tz); config.setGroup( "Language" ); QString lang = config.readEntry( "Language", getenv("LANG") ); if ( !lang.isNull() ) setenv( "LANG", lang, 1 ); } int initApplication( int argc, char ** argv ) { initEnvironment(); -#if !defined(QT_QWS_CASSIOPEIA) && !defined(QT_QWS_IPAQ) && !defined(QT_QWS_EBX) +#if !defined(QT_QWS_CASSIOPEIA) && !defined(QT_QWS_IPAQ) && !defined(QT_QWS_SL5XXX) setenv( "QWS_SIZE", "240x320", 0 ); #endif //Don't flicker at startup: QWSServer::setDesktopBackground( QImage() ); DesktopApplication a( argc, argv, QApplication::GuiServer ); ODevice::inst ( )-> setSoftSuspend ( true ); { // init backlight QCopEnvelope e("QPE/System", "setBacklight(int)" ); e << -3; // Forced on } AlarmServer::initialize(); Desktop *d = new Desktop(); QObject::connect( &a, SIGNAL(power()), d, SLOT(togglePower()) ); QObject::connect( &a, SIGNAL(backlight()), d, SLOT(toggleLight()) ); QObject::connect( &a, SIGNAL(symbol()), d, SLOT(toggleSymbolInput()) ); QObject::connect( &a, SIGNAL(numLockStateToggle()), d, SLOT(toggleNumLockState()) ); QObject::connect( &a, SIGNAL(capsLockStateToggle()), d, SLOT(toggleCapsLockState()) ); QObject::connect( &a, SIGNAL(prepareForRestart()), d, SLOT(terminateServers()) ); (void)new SysFileMonitor(d); Network::createServer(d); -#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) +#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) if ( !QFile::exists( "/etc/pointercal" ) ) { // Make sure calibration widget starts on top. Calibrate *cal = new Calibrate; cal->exec(); delete cal; } #endif d->show(); if ( QDate::currentDate ( ). year ( ) < 2000 ) { if ( QMessageBox::information ( 0, DesktopApplication::tr( "Information" ), DesktopApplication::tr( "<p>The system date doesn't seem to be valid.\n(%1)</p><p>Do you want to correct the clock ?</p>" ). arg( TimeString::dateString ( QDate::currentDate ( ))), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { QCopEnvelope e ( "QPE/Application/systemtime", "setDocument(QString)" ); e << QString ( ); } } int rv = a.exec(); delete d; ODevice::inst ( )-> setSoftSuspend ( false ); return rv; } 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 ); } } void remove_pidfile ( ) { ::unlink ( pidfile_path ); } void handle_sigterm ( int /* sig */ ) { if ( qApp ) qApp-> quit ( ); } diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp index 77035a3..8af568d 100644 --- a/core/launcher/taskbar.cpp +++ b/core/launcher/taskbar.cpp @@ -1,133 +1,133 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** 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. ** *********************************************************************/ #include "startmenu.h" #include "inputmethods.h" #include "runningappbar.h" #include "systray.h" #include "calibrate.h" #include "wait.h" #include "appicons.h" #include "taskbar.h" #include "desktop.h" #include <qpe/qpeapplication.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/global.h> -#if defined( QT_QWS_SHARP ) || defined( QT_QWS_IPAQ ) +#if defined( QT_QWS_SL5XXX ) || defined( QT_QWS_IPAQ ) #include <qpe/custom.h> #endif #include <opie/odevice.h> #include <qlabel.h> #include <qlayout.h> #include <qtimer.h> #include <qwindowsystem_qws.h> #include <qwidgetstack.h> #if defined( Q_WS_QWS ) #include <qwsdisplay_qws.h> #include <qgfx_qws.h> #endif using namespace Opie; #define FACTORY(T) \ static QWidget *new##T( bool maximized ) { \ QWidget *w = new T( 0, "test", QWidget::WDestructiveClose | QWidget::WGroupLeader ); \ if ( maximized ) { \ if ( qApp->desktop()->width() <= 350 ) { \ w->showMaximized(); \ } else { \ w->resize( QSize( 300, 300 ) ); \ } \ } \ w->show(); \ return w; \ } #ifdef SINGLE_APP #define APP(a,b,c,d) FACTORY(b) #include "../launcher/apps.h" #undef APP #endif // SINGLE_APP static Global::Command builtins[] = { #ifdef SINGLE_APP #define APP(a,b,c,d) { a, new##b, c }, #include "../launcher/apps.h" #undef APP #endif -#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_SHARP) +#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_SL5XXX) { "calibrate", TaskBar::calibrate, 1, 0 }, #endif #if !defined(QT_QWS_CASSIOPEIA) { "shutdown", Global::shutdown, 1, 0 }, // { "run", run, 1, 0 }, #endif { 0, TaskBar::calibrate, 0, 0 }, }; static bool initNumLock() { #ifdef QPE_INITIAL_NUMLOCK_STATE QPE_INITIAL_NUMLOCK_STATE #endif return FALSE; } class LockKeyState : public QWidget { public: LockKeyState( QWidget *parent ) : QWidget(parent), nl(initNumLock()), cl(FALSE) { nl_pm = Resource::loadPixmap("numlock"); cl_pm = Resource::loadPixmap("capslock"); } QSize sizeHint() const { return QSize(nl_pm.width()+2,nl_pm.width()+nl_pm.height()+1); } void toggleNumLockState() { nl = !nl; repaint(); } void toggleCapsLockState() { cl = !cl; repaint(); } void paintEvent( QPaintEvent * ) { int y = (height()-sizeHint().height())/2; QPainter p(this); if ( nl ) p.drawPixmap(1,y,nl_pm); if ( cl ) p.drawPixmap(1,y+nl_pm.height()+1,cl_pm); diff --git a/core/multimedia/opieplayer/loopcontrol_threaded.cpp b/core/multimedia/opieplayer/loopcontrol_threaded.cpp index 1b89bc8..6817d5b 100644 --- a/core/multimedia/opieplayer/loopcontrol_threaded.cpp +++ b/core/multimedia/opieplayer/loopcontrol_threaded.cpp @@ -1,90 +1,90 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** 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. ** **********************************************************************/ #define _REENTRANT #include <qpe/qpeapplication.h> #include <qimage.h> #include <qpainter.h> #ifdef Q_WS_QWS #include <qpe/qcopenvelope_qws.h> #endif #include "mediaplayerplugininterface.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #include <pthread.h> #include "loopcontrol.h" #include "audiodevice.h" #include "videowidget.h" #include "audiowidget.h" #include "mediaplayerstate.h" -#if defined(QT_QWS_SHARP) || defined(QT_QWS_IPAQ) +#if defined(QT_QWS_SL5XXX) || defined(QT_QWS_IPAQ) #define USE_REALTIME_AUDIO_THREAD #endif extern VideoWidget *videoUI; // now only needed to tell it to play a frame extern MediaPlayerState *mediaPlayerState; #define DecodeLoopDebug(x) qDebug x //#define DecodeLoopDebug(x) static char *audioBuffer = NULL; static AudioDevice *audioDevice = NULL; static bool disabledSuspendScreenSaver = FALSE; pthread_t video_tid; pthread_attr_t video_attr; pthread_t audio_tid; pthread_attr_t audio_attr; bool emitPlayFinished = FALSE; bool emitChangePos = FALSE; class Mutex { public: Mutex() { pthread_mutexattr_t attr; pthread_mutexattr_init( &attr ); pthread_mutex_init( &mutex, &attr ); pthread_mutexattr_destroy( &attr ); } ~Mutex() { pthread_mutex_destroy( &mutex ); } void lock() { pthread_mutex_lock( &mutex ); } void unlock() { pthread_mutex_unlock( &mutex ); } /* diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp index 81f4d1e..1800be0 100644 --- a/core/opie-login/main.cpp +++ b/core/opie-login/main.cpp @@ -278,91 +278,91 @@ public: } void setBacklight ( int bright ) { if ( bright == -3 ) { // Forced on m_backlight_forcedoff = false; bright = -1; } if ( m_backlight_forcedoff && bright != -2 ) return ; if ( bright == -2 ) { // Toggle between off and on bright = m_backlight_bright ? 0 : -1; m_backlight_forcedoff = !bright; } m_backlight_bright = bright; bright = backlight ( ); ODevice::inst ( ) -> setDisplayBrightness ( bright ); m_backlight_bright = bright; } private: bool m_lcd_status; int m_backlight_bright; bool m_backlight_forcedoff; }; namespace Opie { extern int force_appearance; } // HACK to get around the force-style setting int login_main ( int argc, char **argv, pid_t ppid ) { QWSServer::setDesktopBackground( QImage() ); LoginApplication *app = new LoginApplication ( argc, argv, ppid ); Opie::force_appearance = 0; app-> setFont ( QFont ( "Helvetica", 10 )); app-> setStyle ( new QPEStyle ( )); ODevice::inst ( )-> setSoftSuspend ( true ); -#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) +#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) if ( !QFile::exists ( "/etc/pointercal" )) { // Make sure calibration widget starts on top. Calibrate *cal = new Calibrate; cal-> exec ( ); delete cal; } #endif LoginScreenSaver *saver = new LoginScreenSaver; saver-> setIntervals ( ); QWSServer::setScreenSaver ( saver ); saver-> restore ( ); LoginWindowImpl *lw = new LoginWindowImpl ( ); app-> setMainWidget ( lw ); lw-> setGeometry ( 0, 0, app-> desktop ( )-> width ( ), app-> desktop ( )-> height ( )); lw-> show ( ); int rc = app-> exec ( ); ODevice::inst ( )-> setSoftSuspend ( false ); if ( app-> loginAs ( )) { if ( app-> changeIdentity ( )) { app-> login ( ); // if login succeeds, it never comes back QMessageBox::critical ( 0, LoginWindowImpl::tr( "Failure" ), LoginWindowImpl::tr( "Could not start OPIE." )); rc = 1; } else { QMessageBox::critical ( 0, LoginWindowImpl::tr( "Failure" ), LoginWindowImpl::tr( "Could not switch to new user identity" )); rc = 2; } } return rc; } diff --git a/library/power.cpp b/library/power.cpp index 21c8960..5310b47 100644 --- a/library/power.cpp +++ b/library/power.cpp @@ -1,71 +1,71 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** 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. ** **********************************************************************/ #include "power.h" -#ifdef QT_QWS_SHARP +#ifdef QT_QWS_SL5XXX #include "custom.h" #endif #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <sys/ioctl.h> #ifdef QT_QWS_IPAQ_NO_APM #include <linux/h3600_ts.h> #endif PowerStatusManager *PowerStatusManager::powerManager = 0; PowerStatus *PowerStatusManager::ps = 0; static bool haveProcApm = false; PowerStatusManager::PowerStatusManager() { powerManager = this; ps = new PowerStatus; FILE *f = fopen("/proc/apm", "r"); if ( f ) { fclose(f); haveProcApm = TRUE; } } const PowerStatus &PowerStatusManager::readStatus() { if ( !powerManager ) (void)new PowerStatusManager; powerManager->getStatus(); return *ps; } // Standard /proc/apm reader bool PowerStatusManager::getProcApmStatus( int &ac, int &bs, int &bf, int &pc, int &sec ) { bool ok = false; ac = 0xff; bs = 0xff; bf = 0xff; pc = -1; diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 95c4a1b..7463074 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -1696,97 +1696,97 @@ int QPEApplication::exec() /*! \internal External request for application to quit. Quits if possible without loosing state. */ void QPEApplication::tryQuit() { if ( activeModalWidget() || strcmp( argv() [ 0 ], "embeddedkonsole" ) == 0 ) return ; // Inside modal loop or konsole. Too hard to save state. #ifndef QT_NO_COP { QCopEnvelope e( "QPE/System", "closing(QString)" ); e << d->appName; } #endif processEvents(); quit(); } /*! \internal User initiated quit. Makes the window 'Go Away'. If preloaded this means hiding the window. If not it means quitting the application. As this is user initiated we don't need to check state. */ void QPEApplication::hideOrQuit() { processEvents(); // If we are a preloaded application we don't actually quit, so emit // a System message indicating we're quasi-closing. if ( d->preloaded && d->qpe_main_widget ) #ifndef QT_NO_COP { QCopEnvelope e("QPE/System", "fastAppHiding(QString)" ); e << d->appName; d->qpe_main_widget->hide(); } #endif else quit(); } -#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SHARP) +#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) // The libraries with the skiff package (and possibly others) have // completely useless implementations of builtin new and delete that // use about 50% of your CPU. Here we revert to the simple libc // functions. void* operator new[]( size_t size ) { return malloc( size ); } void* operator new( size_t size ) { return malloc( size ); } void operator delete[]( void* p ) { free( p ); } void operator delete[]( void* p, size_t /*size*/ ) { free( p ); } void operator delete( void* p ) { free( p ); } void operator delete( void* p, size_t /*size*/ ) { free( p ); } #endif #if ( QT_VERSION <= 230 ) && !defined(SINGLE_APP) #include <qwidgetlist.h> #ifdef QWS #include <qgfx_qws.h> extern QRect qt_maxWindowRect; void qt_setMaxWindowRect(const QRect& r ) { qt_maxWindowRect = qt_screen->mapFromDevice( r, qt_screen->mapToDevice( QSize( qt_screen->width(), qt_screen->height() ) ) ); // Re-resize any maximized windows diff --git a/library/storage.cpp b/library/storage.cpp index 3668d29..a7c466d 100644 --- a/library/storage.cpp +++ b/library/storage.cpp @@ -1,71 +1,71 @@ /********************************************************************** ** Copyright (C) Holger 'zecke' Freyther <freyther@kde.org> ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** 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. ** **********************************************************************/ #include <qpe/storage.h> -#ifdef QT_QWS_SHARP +#ifdef QT_QWS_SL5XXX #include <qpe/custom.h> #endif #include <qfile.h> #include <qtimer.h> #include <qcopchannel_qws.h> #include <stdio.h> #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) #include <sys/vfs.h> #include <mntent.h> #endif #include <qstringlist.h> static bool isCF(const QString& m) { FILE* f = fopen("/var/run/stab", "r"); if (!f) f = fopen("/var/state/pcmcia/stab", "r"); if (!f) f = fopen("/var/lib/pcmcia/stab", "r"); if ( f ) { char line[1024]; char devtype[80]; char devname[80]; while ( fgets( line, 1024, f ) ) { // 0 ide ide-cs 0 hda 3 0 if ( sscanf(line,"%*d %s %*s %*s %s", devtype, devname )==2 ) { if ( QString(devtype) == "ide" && m.find(devname)>0 ) { fclose(f); return TRUE; } } } fclose(f); } return FALSE; } StorageInfo::StorageInfo( QObject *parent ) : QObject( parent ) { mFileSystems.setAutoDelete( TRUE ); channel = new QCopChannel( "QPE/Card", this ); connect( channel, SIGNAL(received(const QCString &, const QByteArray &)), this, SLOT(cardMessage( const QCString &, const QByteArray &)) ); update(); diff --git a/mkspecs/qws/linux-sharp-g++/qmake.conf b/mkspecs/qws/linux-sharp-g++/qmake.conf index 06bf445..814b4fc 100644 --- a/mkspecs/qws/linux-sharp-g++/qmake.conf +++ b/mkspecs/qws/linux-sharp-g++/qmake.conf @@ -1,73 +1,73 @@ # # $Id$ # # qmake configuration for linux-g++ using the arm-linux-g++ crosscompiler # MAKEFILE_GENERATOR = UNIX TEMPLATE = app CONFIG += qt warn_on release QMAKE_CC = arm-linux-gcc QMAKE_LEX = flex QMAKE_LEXFLAGS = QMAKE_YACC = yacc QMAKE_YACCFLAGS = -d QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA) QMAKE_CFLAGS_WARN_ON = -Wall -W QMAKE_CFLAGS_WARN_OFF = QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2) QMAKE_CFLAGS_DEBUG = -g QMAKE_CFLAGS_SHLIB = -fPIC QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses QMAKE_CFLAGS_THREAD = -D_REENTRANT -QMAKE_CXX = arm-linux-g++ -DQT_QWS_SHARP -DQT_QWS_EBX +QMAKE_CXX = arm-linux-g++ -DQT_QWS_SL5XXX -DQT_QWS_SHARP -DQT_QWS_EBX -DQT_QWS_CUSTOM QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DQWS -fno-exceptions -fno-rtti $(CXXFLAGS_EXTRA) QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD QMAKE_INCDIR = QMAKE_LIBDIR = QMAKE_INCDIR_X11 = QMAKE_LIBDIR_X11 = QMAKE_INCDIR_QT = $(QTDIR)/include QMAKE_LIBDIR_QT = $(QTDIR)/lib QMAKE_INCDIR_OPENGL = /usr/X11R6/include QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib QMAKE_LINK = arm-linux-gcc QMAKE_LINK_SHLIB = arm-linux-gcc QMAKE_LFLAGS = $(LFLAGS_EXTRA) QMAKE_LFLAGS_RELEASE = QMAKE_LFLAGS_DEBUG = QMAKE_LFLAGS_SHLIB = -shared QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_SONAME = -Wl,-soname, QMAKE_LFLAGS_THREAD = QMAKE_RPATH = -Wl,-rpath, QMAKE_LIBS = $(LIBS_EXTRA) QMAKE_LIBS_DYNLOAD = -ldl QMAKE_LIBS_X11 = QMAKE_LIBS_X11SM = QMAKE_LIBS_QT = -lqte QMAKE_LIBS_QT_THREAD = -lqte-mt QMAKE_LIBS_QT_OPENGL = -lqgl QMAKE_LIBS_THREAD = -lpthread QMAKE_MOC = $(QTDIR)/bin/moc QMAKE_UIC = $(QTDIR)/bin/uic QMAKE_AR = ar cqs QMAKE_RANLIB = QMAKE_TAR = tar -cf QMAKE_GZIP = gzip -9f QMAKE_COPY = cp -f diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 0ec6fad..d4396d2 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp @@ -248,116 +248,116 @@ void MediaPlayer::timerEvent( QTimerEvent * ) { QFont f; f.setPixelSize( 20 ); f.setBold( TRUE ); p.setFont( f ); p.drawText( (w - 200) / 2, h - yoff + 20, tr("Volume") ); for ( unsigned int i = 0; i < 10; i++ ) { if ( v > i ) { p.drawRect( ( w - 200 ) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 ); } else { p.drawRect( ( w - 200 ) / 2 + i * 20 + 3, h - yoff + 50, 3, 10 ); } } } else { w = videoUI()->width(); h = videoUI()->height(); if ( drawnOnScreenDisplay ) { if ( onScreenDisplayVolume > v ) { videoUI()->repaint( (w - 200) / 2 + v * 20 + 0, h - yoff + 40, ( onScreenDisplayVolume - v ) * 20 + 9, 30, FALSE ); } } drawnOnScreenDisplay = TRUE; onScreenDisplayVolume = v; QPainter p( videoUI() ); p.setPen( QColor( 0x10, 0xD0, 0x10 ) ); p.setBrush( QColor( 0x10, 0xD0, 0x10 ) ); QFont f; f.setPixelSize( 20 ); f.setBold( TRUE ); p.setFont( f ); p.drawText( (w - 200) / 2, h - yoff + 20, tr( "Volume" ) ); for ( unsigned int i = 0; i < 10; i++ ) { if ( v > i ) { p.drawRect( (w - 200) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 ); } else { p.drawRect( (w - 200) / 2 + i * 20 + 3, h - yoff + 50, 3, 10 ); } } } } void MediaPlayer::blank( bool b ) { fd=open("/dev/fb0",O_RDWR); -#ifdef QT_QWS_EBX +#ifdef QT_QWS_SL5XXX fl= open( "/dev/fl", O_RDWR ); #endif if (fd != -1) { if ( b ) { qDebug("do blanking"); -#ifdef QT_QWS_EBX +#ifdef QT_QWS_SL5XXX ioctl( fd, FBIOBLANK, 1 ); if(fl !=-1) { ioctl( fl, 2 ); ::close(fl); } #else ioctl( fd, FBIOBLANK, 3 ); #endif isBlanked = TRUE; } else { qDebug("do unblanking"); ioctl( fd, FBIOBLANK, 0); -#ifdef QT_QWS_EBX +#ifdef QT_QWS_SL5XXX if(fl != -1) { ioctl( fl, 1); ::close(fl); } #endif isBlanked = FALSE; } close( fd ); } else { qDebug("<< /dev/fb0 could not be opened >>"); } } void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { switch ( e->key() ) { ////////////////////////////// Zaurus keys case Key_Home: break; case Key_F9: //activity break; case Key_F10: //contacts break; case Key_F11: //menu break; case Key_F12: //home qDebug("Blank here"); // mediaPlayerState->toggleBlank(); break; case Key_F13: //mail qDebug("Blank here"); // mediaPlayerState->toggleBlank(); break; } } void MediaPlayer::cleanUp() {// this happens on closing Config cfg( "OpiePlayer" ); mediaPlayerState.writeConfig( cfg ); playList.writeDefaultPlaylist( ); // QPEApplication::grabKeyboard(); // QPEApplication::ungrabKeyboard(); } void MediaPlayer::recreateAudioAndVideoWidgets() const { delete m_skinLoader; diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index dd341c0..afcdd49 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp @@ -24,97 +24,97 @@ #include <qpe/qpeapplication.h> #include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/storage.h> #include <qmessagebox.h> #include <qapplication.h> #include <qslider.h> #include <qcheckbox.h> #include <qlineedit.h> #include <qcombobox.h> #include <qlabel.h> #include <sys/utsname.h> #include <sys/time.h> #include <sys/types.h> #include <unistd.h> #include <stdio.h> #include <sys/stat.h> SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) : SoundSettingsBase( parent, objname, TRUE, fl ) { keyReset=FALSE; noWarning=false; Config config( "qpe"); config.setGroup( "Volume" ); Config cfg("Vmemo"); connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); cfg.setGroup("Record"); int rate=config.readNumEntry("SampleRate", 22050); if(rate == 8000) sampleRate->setCurrentItem(0); else if(rate == 11025) sampleRate->setCurrentItem(1); else if(rate == 22050) sampleRate->setCurrentItem(2); else if(rate == 33075) sampleRate->setCurrentItem(3); else if(rate==44100) sampleRate->setCurrentItem(4); stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); //TODO hide if zaurus- mono only -#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) +#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) //since ipaq and zaurus have particular //devices bool systemZaurus=FALSE; struct utsname name; /* check for embedix kernel running on the zaurus*/ if (uname(&name) != -1) {// TODO change this here,... QString release=name.release; if( release.find("embedix",0,TRUE) != -1) { qDebug("IS System Zaurus"); systemZaurus=TRUE; } } if(!systemZaurus) { stereoCheckBox->setChecked(TRUE); } stereoCheckBox->setEnabled(FALSE); sixteenBitCheckBox->setEnabled(FALSE); #else #endif int sRate=cfg.readNumEntry("SizeLimit", 30); qDebug("%d",sRate); if(sRate ==30) timeLimitComboBox->setCurrentItem(0); else if(sRate==20) timeLimitComboBox->setCurrentItem(1); else if(sRate == 15) timeLimitComboBox->setCurrentItem(2); else if(sRate == 10) timeLimitComboBox->setCurrentItem(3); else if(sRate == 5) timeLimitComboBox->setCurrentItem(4); else timeLimitComboBox->setCurrentItem(5); sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); cfg.setGroup("Defaults"); keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); updateStorageCombo(); connect( LocationComboBox,SIGNAL(activated(const QString &)), this, SLOT( setLocation(const QString &))); connect( keyComboBox,SIGNAL(activated( int)), this, SLOT( setKeyButton( int))); connect( timeLimitComboBox,SIGNAL(activated( const QString &)), this, SLOT( setSizeLimitButton(const QString &))); connect( restartCheckBox,SIGNAL( toggled( bool)), this, SLOT( restartOpie( bool))); diff --git a/noncore/tools/formatter/formatter.cpp b/noncore/tools/formatter/formatter.cpp index f275fbe..79a7f9e 100644 --- a/noncore/tools/formatter/formatter.cpp +++ b/noncore/tools/formatter/formatter.cpp @@ -138,97 +138,97 @@ FormatterApp::FormatterApp( QWidget* parent, const char* name, bool modal, WFla fsckButton->setMaximumWidth(100); tabLayout_2->addMultiCellWidget( fsckButton, 7, 7, 1, 1); TextLabel3 = new QLabel( tab_2, "TextLabel3" ); TextLabel3->setText( tr( "Device" ) ); tabLayout_2->addMultiCellWidget( TextLabel3, 4, 4, 0, 1 ); QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); tabLayout_2->addItem( spacer_3, 5, 0 ); TextLabel1 = new QLabel( tab_2, "TextLabel1" ); TextLabel1->setText( tr( "Mount Point" ) ); tabLayout_2->addMultiCellWidget( TextLabel1, 1, 1, 0, 1 ); QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); tabLayout_2->addItem( spacer_4, 2, 1 ); TabWidget->insertTab( tab_2, tr( "Advanced" ) ); FormatterAppLayout->addWidget( TabWidget, 0, 1 ); connect( formatPushButton ,SIGNAL(released()),this,SLOT( doFormat()) ); connect( editPushButton ,SIGNAL(released()),this,SLOT( editFstab()) ); connect( fsckButton ,SIGNAL(released()),this,SLOT( doFsck()) ); connect( fileSystemsCombo,SIGNAL(activated(int)),this,SLOT( fsComboSelected(int ) )); connect( storageComboBox,SIGNAL(activated(int)),this,SLOT( storageComboSelected(int ) )); connect( deviceComboBox,SIGNAL(activated(int)),this,SLOT( deviceComboSelected(int ) )); fillCombos(); } FormatterApp::~FormatterApp() { } void FormatterApp::doFormat() { int err=0; Output *outDlg; QString umountS, remountS; QString text = storageComboBox->currentText(); QString currentText = storageComboBox->currentText(); QString cmd; QString diskDevice = currentText.right( currentText.length() - currentText.find(" -> ",0,TRUE) - 4); QString diskName = currentText.left(currentText.find(" -> ",0,TRUE)); QString fs = fileSystemsCombo->currentText(); -#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) // lets test on something cheap +#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) // lets test on something cheap #else currentText = diskDevice = "/dev/fd0"; umountS = "umount -v /floppy 2>&1"; remountS = "mount -v /floppy 2>&1"; #endif if( currentText.find("CF",0,TRUE) != -1) { umountS = "umount "; remountS = "mount "; // umountS = "/sbin/cardctl eject"; // remountS = "/sbin/cardctl insert"; } if( currentText.find("SD",0,TRUE) != -1) { umountS = "umount "; remountS = "mount "; // umountS = "/etc/sdcontrol compeject"; // remountS = "/etc/sdcontrol insert"; } switch ( QMessageBox::warning(this,tr("Format?!?"),tr("Really format\n") +diskName+" "+ currentText + tr("\nwith ") + fs + tr(" filesystem?!?\nYou will loose all data!!"),tr("Yes"),tr("No"),0,1,1) ) { case 0: { if(fs == "vfat") cmd = "mkdosfs -v " + diskDevice+" 2>&1"; else if(fs == "ext2") cmd = "mke2fs -v " + diskDevice+" 2>&1"; else { QMessageBox::warning(this, tr("Formatter"),tr("Could not format.\nUnknown type"), tr("Ok")); break; } // cmd = "ls -l"; outDlg = new Output(this, tr("Formatter Output"),FALSE); outDlg->showMaximized(); outDlg->show(); qApp->processEvents(); FILE *fp; char line[130]; outDlg->OutputEdit->append( tr("Trying to umount.") + currentText ); outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); sleep(1); qDebug("Command is "+umountS); fp = popen( (const char *) umountS, "r"); qDebug("%d", fp); if ( !fp ) { qDebug("Could not execute '" + umountS + "'! err=%d\n" +(QString)strerror(errno), err); QMessageBox::warning( this, tr("Formatter"), tr("umount failed!"), tr("&OK") ); @@ -428,97 +428,97 @@ void FormatterApp::parsetab(const QString &fileName) { fileSystemTypeList << deviceName+"::"+filesystemType; } } } endmntent( mntfp ); // } else if(fileName == "/etc/fstab") { // QFile f("/etc/fstab"); // if ( f.open(IO_ReadOnly) ) { // QTextStream t (&f); // QString s; // while (! t.eof()) { // s=t.readLine(); // s=s.simplifyWhiteSpace(); // if ( (!s.isEmpty() ) && (s.find(" ")!=0) ) { // // = me->mnt_fsname; // QString filesystemType = me->mnt_type; // QString deviceName = s.left(0,s.find(BLANK) ); // s=s.remove(0,s.find(BLANK)+1 ); // devicename // s=s.remove(0,s.find(BLANK)+1 ); // mountpoint // QStringt mountPoint= s.left(0,s.find(BLANK) ); // s=s.remove(0,s.find(BLANK)+1 ); // fs // QString filesystemType= s.left(0,s.find(BLANK) ); // } // } // } // f.close(); // } } QString FormatterApp::getFileSystemType(const QString ¤tText) { parsetab("/etc/mtab"); //why did TT forget filesystem type? for ( QStringList::Iterator it = fileSystemTypeList.begin(); it != fileSystemTypeList.end(); ++it ) { QString temp = (*it); if( temp.find( currentText,0,TRUE) != -1) { return temp.right( temp.length() - temp.find("::",0,TRUE) - 2); // qDebug(fsType); } } return ""; } bool FormatterApp::doFsck() { Output *outDlg; QString selectedDevice; -// #if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) +// #if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) selectedDevice = deviceComboBox->currentText(); QString mountPoint = mountPointLineEdit->text(); QString umountS = "umount -v "+mountPoint+" 2>&1"; QString remountS = "mount -v "+mountPoint+" 2>&1"; // #else // // for testing // // currentText = diskDevice = "/dev/fd0"; // QString umountS = "umount -v /floppy 2>&1"; // QString remountS = "mount -v /floppy 2>&1"; // selectedDevice ="/dev/fd0"; // #endif QString fsType = getFileSystemType((const QString &)selectedDevice); QString cmd; qDebug( selectedDevice +" "+ fsType); if(fsType == "vfat") cmd = "dosfsck -vy "; if(fsType == "ext2") cmd = "e2fsck -cpvy "; cmd += selectedDevice + " 2>&1"; outDlg = new Output(this, tr("Formatter Output"),FALSE); outDlg->showMaximized(); outDlg->show(); qApp->processEvents(); FILE *fp; char line[130]; outDlg->OutputEdit->append( tr("Trying to umount.")); outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); sleep(1); // qDebug("Command is "+umountS); fp = popen( (const char *) umountS, "r"); // qDebug("%d", fp); if ( !fp ) { qDebug("Could not execute '" + umountS + "'!\n" +(QString)strerror(errno)); QMessageBox::warning( this, tr("Formatter"), tr("umount failed!"), tr("&OK") ); pclose(fp); return false; } else { // outDlg->OutputEdit->append( currentText + tr("\nhas been successfully umounted.")); // outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); while ( fgets( line, sizeof line, fp)) { if( ((QString)line).find("busy",0,TRUE) != -1) { qDebug("Could not find '" + umountS); QMessageBox::warning( this, tr("Formatter"), tr("Could not umount.\nDevice is busy!"), tr("&OK") ); pclose(fp); return false; diff --git a/qt/qconfig-qpe.h b/qt/qconfig-qpe.h index 2b05f90..30d8190 100644 --- a/qt/qconfig-qpe.h +++ b/qt/qconfig-qpe.h @@ -1,82 +1,82 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** 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. ** **********************************************************************/ #ifndef QT_H #endif // QT_H // Empty leaves all features enabled. See doc/html/features.html for choices. // Note that disabling some features will produce a libqt that is not // compatible with other libqt builds. Such modifications are only // supported on Qt/Embedded where reducing the library size is important // and where the application-suite is often a fixed set. #ifndef QT_DLL #define QT_DLL // Internal #endif -#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_EBX) +#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_SL5XXX) # define QT_NO_QWS_CURSOR # define QT_NO_QWS_MOUSE_AUTO #endif #ifndef QT_NO_CODECS #define QT_NO_CODECS #endif #define QT_NO_UNICODETABLES //#define QT_NO_IMAGEIO_BMP #define QT_NO_IMAGEIO_PPM //#define QT_NO_ASYNC_IO //#define QT_NO_ASYNC_IMAGE_IO #define QT_NO_FREETYPE #define QT_NO_BDF //#define QT_NO_FONTDATABASE #define QT_NO_DRAGANDDROP //#define QT_NO_CLIPBOARD #define QT_NO_PROPERTIES #define QT_NO_NETWORKPROTOCOL #define QT_NO_IMAGE_TEXT //#define QT_NO_TOOLTIP #define QT_NO_COLORNAMES #define QT_NO_TRANSFORMATIONS #define QT_NO_TRANSLATION_BUILDER #define QT_NO_COMPLEXTEXT #define QT_NO_PRINTER #define QT_NO_PICTURE //#define QT_NO_ICONVIEW #define QT_NO_DIAL #define QT_NO_SIZEGRIP #define QT_NO_WORKSPACE //#define QT_NO_TABLE //#define QT_NO_ACTION //#define QT_NO_SETTINGS #define QT_NO_STYLE_POCKETPC #ifndef QT_NO_STYLE_AQUA # define QT_NO_STYLE_AQUA #endif #define QT_NO_STYLE_MOTIF #define QT_NO_STYLE_PLATINUM #define QT_NO_FILEDIALOG #define QT_NO_FONTDIALOG #define QT_NO_PRINTDIALOG #define QT_NO_COLORDIALOG #define QT_NO_INPUTDIALOG //#define QT_NO_MESSAGEBOX #define QT_NO_PROGRESSDIALOG diff --git a/x11/libqpe-x11/qpe/qpeapplication.cpp b/x11/libqpe-x11/qpe/qpeapplication.cpp index ed815f8..eb01e50 100644 --- a/x11/libqpe-x11/qpe/qpeapplication.cpp +++ b/x11/libqpe-x11/qpe/qpeapplication.cpp @@ -710,86 +710,86 @@ void QPEApplication::prepareForTermination( bool willrestart ) // Draw a big wait icon, the image can be altered in later revisions // QWidget *d = QApplication::desktop(); QImage img = Resource::loadImage( "launcher/new_wait" ); QPixmap pix; pix.convertFromImage( img.smoothScale( 1 * img.width(), 1 * img.height() ) ); QLabel *lblWait = new QLabel( 0, "wait hack!", QWidget::WStyle_Customize | QWidget::WStyle_NoBorder | QWidget::WStyle_Tool ); lblWait->setPixmap( pix ); lblWait->setAlignment( QWidget::AlignCenter ); lblWait->show(); lblWait->showMaximized(); } #ifndef SINGLE_APP { QCopEnvelope envelope( "QPE/System", "forceQuit()" ); } processEvents(); // ensure the message goes out. sleep( 1 ); // You have 1 second to comply. #endif } int QPEApplication::x11ClientMessage(QWidget* w, XEvent* event, bool b ) { qWarning("X11 ClientMessage %d %d", event->type, ClientMessage); if ( event->type == ClientMessage ) { if ( (event->xclient.message_type == d->wm_protocols) && (event->xclient.data.l[0] == d->wm_context_accept ) ) { qWarning("accepted!!!"); /* * I'm not sure if we should use activeWidget * or activeModalWidget * a QDialog could be not modal too */ if ( w->inherits("QDialog" ) ) { qWarning("inherits QDialog!!!"); QDialog* dia = (QDialog*)w; /* * call it directly or via QTimer::singleShot? */ QTimer::singleShot(0, dia, SLOT(accept() ) ); return 0; } } } return QApplication::x11ClientMessage(w, event, b ); } #define KeyPress XKeyPress #define KeyRelease XKeyRelease -#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) +#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) // The libraries with the skiff package (and possibly others) have // completely useless implementations of builtin new and delete that // use about 50% of your CPU. Here we revert to the simple libc // functions. void* operator new[]( size_t size ) { return malloc( size ); } void* operator new( size_t size ) { return malloc( size ); } void operator delete[]( void* p ) { free( p ); } void operator delete[]( void* p, size_t /*size*/ ) { free( p ); } void operator delete( void* p ) { free( p ); } void operator delete( void* p, size_t /*size*/ ) { free( p ); } #endif |