-rw-r--r-- | configs/linux-sharp-g++-shared | 2 | ||||
-rw-r--r-- | configs/linux-sharp-g++-shared-debug | 2 | ||||
-rw-r--r-- | configs/linux-sharp-g++-static | 2 | ||||
-rw-r--r-- | configs/linux-sharp-g++-static-debug | 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 | 2 | ||||
-rw-r--r-- | core/launcher/shutdownimpl.cpp | 2 | ||||
-rw-r--r-- | core/launcher/taskbar.cpp | 4 | ||||
-rw-r--r-- | core/multimedia/opieplayer/loopcontrol_threaded.cpp | 2 | ||||
-rw-r--r-- | library/alarmserver.cpp | 2 | ||||
-rw-r--r-- | library/power.cpp | 4 | ||||
-rw-r--r-- | library/storage.cpp | 2 | ||||
-rw-r--r-- | qt/qte233-for-opie091-keyboard.patch | 4 |
14 files changed, 17 insertions, 17 deletions
diff --git a/configs/linux-sharp-g++-shared b/configs/linux-sharp-g++-shared index 9c1dd03..862ee34 100644 --- a/configs/linux-sharp-g++-shared +++ b/configs/linux-sharp-g++-shared @@ -32,63 +32,63 @@ SYSCONF_LIBS_OPENGL = SYSCONF_LIBS_YACC = # Linking applications SYSCONF_LINK = arm-linux-gcc SYSCONF_LFLAGS = SYSCONF_LIBS = # Link flags for shared objects SYSCONF_LFLAGS_SHOBJ = -shared # Flags for threading SYSCONF_CFLAGS_THREAD = -D_REENTRANT SYSCONF_CXXFLAGS_THREAD = -D_REENTRANT SYSCONF_LFLAGS_THREAD = SYSCONF_LIBS_THREAD = -lpthread # Meta-object compiler SYSCONF_MOC = $(QTDIR)/bin/moc # UI compiler SYSCONF_UIC = $(QTDIR)/bin/uic # Linking shared libraries # - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2 # - Place target in $(DESTDIR) - which has a trailing / # - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH) # SYSCONF_LINK_SHLIB = arm-linux-gcc SYSCONF_LINK_TARGET_SHARED = lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH) SYSCONF_LINK_LIB_SHARED = $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \ $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \ $(OBJECTS) $(OBJMOC) $(LIBS) && \ mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \ cd $(DESTDIR) && \ rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so; \ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ); \ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN) # Linking static libraries # - Build the $(TARGET) library, eg. lib$(TARGET).a # - Place target in $(DESTDIR) - which has a trailing / # SYSCONF_AR = arm-linux-ar cqs SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a SYSCONF_LINK_LIB_STATIC = rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \ $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC) # Compiling application source -SYSCONF_CXXFLAGS = -pipe -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -O2 -Wall -W +SYSCONF_CXXFLAGS = -pipe -DQT_QWS_EBX -DQT_QWS_SHARP -DQWS -fno-exceptions -fno-rtti -O2 -Wall -W SYSCONF_CFLAGS = -pipe -O2 -Wall -W # Default link type (static linking is still be used where required) SYSCONF_LINK_LIB = $(SYSCONF_LINK_LIB_SHARED) SYSCONF_LINK_TARGET = $(SYSCONF_LINK_TARGET_SHARED) # Compiling library source SYSCONF_CXXFLAGS_LIB = -fPIC SYSCONF_CFLAGS_LIB = -fPIC # Compiling shared-object source SYSCONF_CXXFLAGS_SHOBJ = -fPIC SYSCONF_CFLAGS_SHOBJ = -fPIC # Linking Qt SYSCONF_LIBS_QTLIB = $(SYSCONF_LFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT) # Linking Qt applications SYSCONF_LIBS_QTAPP = diff --git a/configs/linux-sharp-g++-shared-debug b/configs/linux-sharp-g++-shared-debug index 810eef5..5e7819c 100644 --- a/configs/linux-sharp-g++-shared-debug +++ b/configs/linux-sharp-g++-shared-debug @@ -32,63 +32,63 @@ SYSCONF_LIBS_OPENGL = SYSCONF_LIBS_YACC = # Linking applications SYSCONF_LINK = arm-linux-gcc SYSCONF_LFLAGS = SYSCONF_LIBS = # Link flags for shared objects SYSCONF_LFLAGS_SHOBJ = -shared # Flags for threading SYSCONF_CFLAGS_THREAD = -D_REENTRANT SYSCONF_CXXFLAGS_THREAD = -D_REENTRANT SYSCONF_LFLAGS_THREAD = SYSCONF_LIBS_THREAD = -lpthread # Meta-object compiler SYSCONF_MOC = $(QTDIR)/bin/moc # UI compiler SYSCONF_UIC = $(QTDIR)/bin/uic # Linking shared libraries # - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2 # - Place target in $(DESTDIR) - which has a trailing / # - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH) # SYSCONF_LINK_SHLIB = arm-linux-gcc SYSCONF_LINK_TARGET_SHARED = lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH) SYSCONF_LINK_LIB_SHARED = $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \ $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \ $(OBJECTS) $(OBJMOC) $(LIBS) && \ mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \ cd $(DESTDIR) && \ rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so; \ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ); \ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN) # Linking static libraries # - Build the $(TARGET) library, eg. lib$(TARGET).a # - Place target in $(DESTDIR) - which has a trailing / # SYSCONF_AR = arm-linux-ar cqs SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a SYSCONF_LINK_LIB_STATIC = rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \ $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC) # Compiling application source -SYSCONF_CXXFLAGS = -pipe -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -g -Wall -W +SYSCONF_CXXFLAGS = -pipe -DQT_QWS_EBX -DQT_QWS_SHARP -DQWS -fno-exceptions -fno-rtti -g -Wall -W SYSCONF_CFLAGS = -pipe -g -Wall -W # Default link type (static linking is still be used where required) SYSCONF_LINK_LIB = $(SYSCONF_LINK_LIB_SHARED) SYSCONF_LINK_TARGET = $(SYSCONF_LINK_TARGET_SHARED) # Compiling library source SYSCONF_CXXFLAGS_LIB = -fPIC SYSCONF_CFLAGS_LIB = -fPIC # Compiling shared-object source SYSCONF_CXXFLAGS_SHOBJ = -fPIC SYSCONF_CFLAGS_SHOBJ = -fPIC # Linking Qt SYSCONF_LIBS_QTLIB = $(SYSCONF_LFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT) # Linking Qt applications SYSCONF_LIBS_QTAPP = diff --git a/configs/linux-sharp-g++-static b/configs/linux-sharp-g++-static index 15e4c7f..22d3d04 100644 --- a/configs/linux-sharp-g++-static +++ b/configs/linux-sharp-g++-static @@ -32,62 +32,62 @@ SYSCONF_LIBS_OPENGL = SYSCONF_LIBS_YACC = # Linking applications SYSCONF_LINK = arm-linux-gcc SYSCONF_LFLAGS = SYSCONF_LIBS = # Link flags for shared objects SYSCONF_LFLAGS_SHOBJ = -shared # Flags for threading SYSCONF_CFLAGS_THREAD = -D_REENTRANT SYSCONF_CXXFLAGS_THREAD = -D_REENTRANT SYSCONF_LFLAGS_THREAD = SYSCONF_LIBS_THREAD = -lpthread # Meta-object compiler SYSCONF_MOC = $(QTDIR)/bin/moc # UI compiler SYSCONF_UIC = $(QTDIR)/bin/uic # Linking shared libraries # - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2 # - Place target in $(DESTDIR) - which has a trailing / # - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH) # SYSCONF_LINK_SHLIB = arm-linux-gcc SYSCONF_LINK_TARGET_SHARED = lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH) SYSCONF_LINK_LIB_SHARED = $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \ $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \ $(OBJECTS) $(OBJMOC) $(LIBS) && \ mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \ cd $(DESTDIR) && \ rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so; \ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ); \ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN) # Linking static libraries # - Build the $(TARGET) library, eg. lib$(TARGET).a # - Place target in $(DESTDIR) - which has a trailing / # SYSCONF_AR = arm-linux-ar cqs SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a SYSCONF_LINK_LIB_STATIC = rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \ $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC) # Compiling application source -SYSCONF_CXXFLAGS = -pipe -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -O2 -Wall -W +SYSCONF_CXXFLAGS = -pipe -DQT_QWS_EBX -DQT_QWS_SHARP -DQWS -fno-exceptions -fno-rtti -O2 -Wall -W SYSCONF_CFLAGS = -pipe -O2 -Wall -W SYSCONF_LINK_LIB = $(SYSCONF_LINK_LIB_STATIC) SYSCONF_LINK_TARGET = $(SYSCONF_LINK_TARGET_STATIC) # Compiling library source SYSCONF_CXXFLAGS_LIB = SYSCONF_CFLAGS_LIB = # Compiling shared-object source SYSCONF_CXXFLAGS_SHOBJ = -fPIC SYSCONF_CFLAGS_SHOBJ = -fPIC # Linking Qt SYSCONF_LIBS_QTLIB = $(SYSCONF_CXXFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT) # Linking Qt applications SYSCONF_LIBS_QTAPP = $(SYSCONF_LFLAGS_X11) $(SYSCONF_CXXFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT) $(SYSCONF_LIBS_X11) diff --git a/configs/linux-sharp-g++-static-debug b/configs/linux-sharp-g++-static-debug index d7715ed..9c1afd3 100644 --- a/configs/linux-sharp-g++-static-debug +++ b/configs/linux-sharp-g++-static-debug @@ -32,62 +32,62 @@ SYSCONF_LIBS_OPENGL = SYSCONF_LIBS_YACC = # Linking applications SYSCONF_LINK = arm-linux-gcc SYSCONF_LFLAGS = SYSCONF_LIBS = # Link flags for shared objects SYSCONF_LFLAGS_SHOBJ = -shared # Flags for threading SYSCONF_CFLAGS_THREAD = -D_REENTRANT SYSCONF_CXXFLAGS_THREAD = -D_REENTRANT SYSCONF_LFLAGS_THREAD = SYSCONF_LIBS_THREAD = -lpthread # Meta-object compiler SYSCONF_MOC = $(QTDIR)/bin/moc # UI compiler SYSCONF_UIC = $(QTDIR)/bin/uic # Linking shared libraries # - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2 # - Place target in $(DESTDIR) - which has a trailing / # - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH) # SYSCONF_LINK_SHLIB = arm-linux-gcc SYSCONF_LINK_TARGET_SHARED = lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH) SYSCONF_LINK_LIB_SHARED = $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \ $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \ $(OBJECTS) $(OBJMOC) $(LIBS) && \ mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \ cd $(DESTDIR) && \ rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so; \ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ); \ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN) # Linking static libraries # - Build the $(TARGET) library, eg. lib$(TARGET).a # - Place target in $(DESTDIR) - which has a trailing / # SYSCONF_AR = arm-linux-ar cqs SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a SYSCONF_LINK_LIB_STATIC = rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \ $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC) # Compiling application source -SYSCONF_CXXFLAGS = -pipe -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -g -Wall -W +SYSCONF_CXXFLAGS = -pipe -DQT_QWS_EBX -DQT_QWS_SHARP -DQWS -fno-exceptions -fno-rtti -g -Wall -W SYSCONF_CFLAGS = -pipe -g -Wall -W SYSCONF_LINK_LIB = $(SYSCONF_LINK_LIB_STATIC) SYSCONF_LINK_TARGET = $(SYSCONF_LINK_TARGET_STATIC) # Compiling library source SYSCONF_CXXFLAGS_LIB = SYSCONF_CFLAGS_LIB = # Compiling shared-object source SYSCONF_CXXFLAGS_SHOBJ = -fPIC SYSCONF_CFLAGS_SHOBJ = -fPIC # Linking Qt SYSCONF_LIBS_QTLIB = $(SYSCONF_CXXFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT) # Linking Qt applications SYSCONF_LIBS_QTAPP = $(SYSCONF_LFLAGS_X11) $(SYSCONF_CXXFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT) $(SYSCONF_LIBS_X11) diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp index d6ee6e8..cacc3c4 100644 --- a/core/apps/embeddedkonsole/TEWidget.cpp +++ b/core/apps/embeddedkonsole/TEWidget.cpp @@ -1060,97 +1060,97 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e ) if( ke->state() == ShiftButton && ke->key() == Key_Tab) { //lets hardcode this sucker // qDebug("key pressed 2 is 0x%x", ke->key()); emitText("\\"); // expose } else if( ke->state() == ControlButton && ke->key() == Key_V) { 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_CUSTOM +//#ifdef QT_QWS_SHARP //# ifndef QT_NO_COP 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(); scrollbar->resize(QApplication::style().scrollBarExtent().width(), contentsRect().height() - hwidth); diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index f2e00d8..3e8c731 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -1,91 +1,91 @@ /********************************************************************** ** 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 "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_CUSTOM ) || defined( QT_QWS_IPAQ ) +#if defined( QT_QWS_SHARP ) || 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 QString &c, const QString &m ) : keyCode( k ), channel( c ), message( m ) { } int getKeyCode() const { return keyCode; } QString getChannel() const { return channel; } QString getMessage() const { return message; } private: int keyCode; QString channel, message; }; typedef QValueList<QCopKeyRegister> KeyRegisterList; KeyRegisterList keyRegisterList; diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index b517c7d..8b91f5d 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp @@ -1,76 +1,76 @@ /********************************************************************** ** 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_CUSTOM ) || defined( QT_QWS_IPAQ ) +#if defined( QT_QWS_SHARP ) || 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) #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) diff --git a/core/launcher/shutdownimpl.cpp b/core/launcher/shutdownimpl.cpp index 9292bb8..a202b7b 100644 --- a/core/launcher/shutdownimpl.cpp +++ b/core/launcher/shutdownimpl.cpp @@ -70,97 +70,97 @@ ShutdownImpl::ShutdownImpl( QWidget* parent, const char *name, WFlags fl ) btngrp-> insert ( quit, 4 ); grid-> addWidget ( quit, 1, 1 ); QPushButton *reboot = new QPushButton ( tr( "Reboot" ), btngrp, "reboot" ); changeButtonColor ( reboot, QColor( 236, 183, 181 ) ); btngrp-> insert ( reboot, 2 ); grid-> addWidget( reboot, 1, 0 ); QPushButton *restart = new QPushButton ( tr( "Restart Opie" ), btngrp, "restart" ); changeButtonColor ( restart, QColor( 236, 236, 179 ) ); btngrp-> insert ( restart, 3 ); grid-> addWidget ( restart, 0, 1 ); QPushButton *shutdown = new QPushButton( tr( "Shutdown" ), btngrp, "shutdown" ); changeButtonColor ( shutdown, QColor( 236, 183, 181 ) ); btngrp-> insert ( shutdown, 1 ); grid-> addWidget ( shutdown, 0, 0 ); vbox-> addWidget ( btngrp ); m_info = new QLabel ( this, "info" ); m_info-> setText( tr( "<p>\n" "These termination options are provided primarily for use while developing and testing the Opie system. In a normal environment, these concepts are unnecessary." ) ); vbox-> addWidget ( m_info ); m_progress = new QProgressBar ( this, "progressBar" ); m_progress-> setFrameShape ( QProgressBar::Panel ); m_progress-> setFrameShadow ( QProgressBar::Sunken ); m_progress-> setTotalSteps ( 20 ); m_progress-> setIndicatorFollowsStyle ( false ); vbox-> addWidget ( m_progress ); vbox-> addItem ( new QSpacerItem ( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); QPushButton *cancel = new QPushButton ( tr( "Cancel" ), this, "cancel" ); changeButtonColor ( cancel, QColor( 181, 222, 178 ) ); cancel-> setDefault ( true ); cancel-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding, cancel-> sizePolicy ( ). hasHeightForWidth ( ) ) ); vbox-> addWidget ( cancel ); m_timer = new QTimer ( this ); connect ( m_timer, SIGNAL( timeout ( ) ), this, SLOT( timeout ( ) ) ); connect ( btngrp, SIGNAL( clicked ( int ) ), this, SLOT( buttonClicked ( int ) ) ); connect ( cancel, SIGNAL( clicked ( ) ), this, SLOT( cancelClicked ( ) ) ); m_progress-> hide ( ); Global::hideInputMethod ( ); -#ifdef QT_QWS_CUSTOM +#ifdef QT_QWS_SHARP shutdown-> hide ( ); #endif } void ShutdownImpl::buttonClicked ( int b ) { m_counter = 0; switch ( b ) { case 1: m_operation = ShutdownSystem; break; case 2: m_operation = RebootSystem; break; case 3: m_operation = RestartDesktop; break; case 4: m_operation = TerminateDesktop; break; } m_info-> hide ( ); m_progress-> show ( ); m_timer-> start ( 300 ); timeout ( ); } void ShutdownImpl::cancelClicked ( ) { m_progress-> hide ( ); m_info-> show ( ); if ( m_timer-> isActive ( ) ) m_timer-> stop ( ); else close ( ); } void ShutdownImpl::timeout ( ) { if ( ( m_counter += 2 ) > m_progress-> totalSteps ( ) ) { m_progress-> hide ( ); m_timer-> stop ( ); emit shutdown ( m_operation ); } else m_progress-> setProgress ( m_counter ); diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp index 7d1aaf1..1e6b74e 100644 --- a/core/launcher/taskbar.cpp +++ b/core/launcher/taskbar.cpp @@ -1,84 +1,84 @@ /********************************************************************** ** 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_CUSTOM ) || defined( QT_QWS_IPAQ ) +#if defined( QT_QWS_SHARP ) || 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 @@ -124,97 +124,97 @@ public: 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); } private: QPixmap nl_pm, cl_pm; bool nl, cl; }; TaskBar::~TaskBar() { } TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOnTop | WGroupLeader) { Global::setBuiltinCommands(builtins); sm = new StartMenu( this ); inputMethods = new InputMethods( this ); connect( inputMethods, SIGNAL(inputToggled(bool)), this, SLOT(calcMaxWindowRect()) ); //new QuickLauncher( this ); stack = new QWidgetStack( this ); stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); label = new QLabel(stack); //mru = new MRUList( stack ); //stack->raiseWidget( mru ); runningAppBar = new RunningAppBar(stack); stack->raiseWidget(runningAppBar); waitIcon = new Wait( this ); (void) new AppIcons( this ); sysTray = new SysTray( this ); // ## make customizable in some way? -#ifdef QT_QWS_CUSTOM +#ifdef QT_QWS_SHARP lockState = new LockKeyState( this ); #else lockState = 0; #endif #if defined(Q_WS_QWS) #if !defined(QT_NO_COP) QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this ); connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) ); #endif #endif waitTimer = new QTimer( this ); connect( waitTimer, SIGNAL( timeout() ), this, SLOT( stopWait() ) ); clearer = new QTimer( this ); QObject::connect(clearer, SIGNAL(timeout()), SLOT(clearStatusBar())); QObject::connect(clearer, SIGNAL(timeout()), sysTray, SLOT(show())); } void TaskBar::setStatusMessage( const QString &text ) { if ( !text.isEmpty() ) { label->setText( text ); stack->raiseWidget( label ); if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) sysTray->hide(); clearer->start( 3000, TRUE ); } else { clearStatusBar(); } } void TaskBar::clearStatusBar() { label->clear(); stack->raiseWidget(runningAppBar); // stack->raiseWidget( mru ); } void TaskBar::startWait() { waitIcon->setWaiting( true ); // a catchall stop after 10 seconds... waitTimer->start( 10 * 1000, true ); } void TaskBar::stopWait(const QString& /*app*/) { diff --git a/core/multimedia/opieplayer/loopcontrol_threaded.cpp b/core/multimedia/opieplayer/loopcontrol_threaded.cpp index c7dc7a8..1b89bc8 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_CUSTOM) || defined(QT_QWS_IPAQ) +#if defined(QT_QWS_SHARP) || 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/library/alarmserver.cpp b/library/alarmserver.cpp index 02bca3d..7e6e515 100644 --- a/library/alarmserver.cpp +++ b/library/alarmserver.cpp @@ -113,97 +113,97 @@ static void saveState() } savefile.close(); unlink( savefilename ); QDir d; d.rename(savefilename+".new",savefilename); } } /*! Sets up the alarm server. Restoring to previous state (session management). */ void AlarmServer::initialize() { //read autosave file and put events in timerEventList QString savefilename = Global::applicationFileName( "AlarmServer", "saveFile" ); QFile savefile(savefilename); if ( savefile.open(IO_ReadOnly) ) { QDataStream ds( &savefile ); while ( !ds.atEnd() ) { timerEventItem *newTimerEventItem = new timerEventItem; ds >> newTimerEventItem->UTCtime; ds >> newTimerEventItem->channel; ds >> newTimerEventItem->message; ds >> newTimerEventItem->data; timerEventList.append( newTimerEventItem ); } savefile.close(); if (!timerEventReceiver) timerEventReceiver = new TimerReceiverObject; setNearestTimerEvent(); } } static const char* atdir = "/var/spool/at/"; static bool triggerAtd( bool writeHWClock = FALSE ) { QFile trigger(QString(atdir) + "trigger"); if ( trigger.open(IO_WriteOnly|IO_Raw) ) { const char* data = -#ifdef QT_QWS_CUSTOM +#ifdef QT_QWS_SHARP //custom atd only writes HW Clock if we write a 'W' ( writeHWClock ) ? "W\n" : #endif data = "\n"; int len = strlen(data); int total_written = trigger.writeBlock(data,len); if ( total_written != len ) { QMessageBox::critical( 0, QObject::tr( "Out of Space" ), QObject::tr( "Unable to schedule alarm.\nFree some memory and try again." ) ); trigger.close(); QFile::remove( trigger.name() ); return FALSE; } return TRUE; } return FALSE; } void TimerReceiverObject::deleteTimer() { if ( !atfilename.isEmpty() ) { unlink( atfilename ); atfilename = QString::null; triggerAtd( FALSE ); } } void TimerReceiverObject::resetTimer() { const int maxsecs = 2147000; int total_written; QDateTime nearest = TimeConversion::fromUTC(nearestTimerEvent->UTCtime); QDateTime now = QDateTime::currentDateTime(); if ( nearest < now ) nearest = now; int secs = TimeConversion::secsTo( now, nearest ); if ( secs > maxsecs ) { // too far for millisecond timing secs = maxsecs; } // System timer (needed so that we wake from deep sleep), // from the Epoch in seconds. // int at_secs = TimeConversion::toUTC(nearest); // qDebug("reset timer to %d seconds from Epoch",at_secs); QString fn = atdir + QString::number(at_secs) + "." + QString::number(getpid()); diff --git a/library/power.cpp b/library/power.cpp index d53ecfe..ec5b309 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_CUSTOM +#ifdef QT_QWS_SHARP #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; @@ -87,97 +87,97 @@ bool PowerStatusManager::getProcApmStatus( int &ac, int &bs, int &bf, int &pc, i // extract data switch ( bs ) { case 0x00: ps->bs = PowerStatus::High; break; case 0x01: ps->bs = PowerStatus::Low; break; case 0x7f: ps->bs = PowerStatus::VeryLow; break; case 0x02: ps->bs = PowerStatus::Critical; break; case 0x03: ps->bs = PowerStatus::Charging; break; case 0x04: case 0xff: // 0xff is Unknown but we map to NotPresent default: ps->bs = PowerStatus::NotPresent; break; } switch ( ac ) { case 0x00: ps->ac = PowerStatus::Offline; break; case 0x01: ps->ac = PowerStatus::Online; break; case 0x02: ps->ac = PowerStatus::Backup; break; } if ( pc > 100 ) pc = -1; ps->percentRemain = pc; ps->secsRemain = sec; ok = true; } return ok; } -#ifdef QT_QWS_CUSTOM +#ifdef QT_QWS_SHARP void PowerStatusManager::getStatus() { int ac, bs, bf, pc, sec; ps->percentAccurate = TRUE; // not for long... if ( haveProcApm && getProcApmStatus( ac, bs, bf, pc, sec ) ) { // special case if ( bs == 0x7f ) ps->bs = PowerStatus::VeryLow; pc = -1; // fake percentage if ( pc < 0 ) { switch ( bs ) { case 0x00: ps->percentRemain = 100; break; // High case 0x01: ps->percentRemain = 30; break; // Low case 0x7f: ps->percentRemain = 10; break; // Very Low case 0x02: ps->percentRemain = 5; break; // Critical case 0x03: ps->percentRemain = -1; break; // Charging } ps->percentAccurate = FALSE; } } char *device = "/dev/apm_bios"; int fd = ::open (device, O_WRONLY); if ( fd >= 0 ) { int bbat_status = ioctl( fd, APM_IOC_BATTERY_BACK_CHK, 0 ); switch ( bbat_status ) { case 0x00: ps->bbs = PowerStatus::High; break; case 0x01: ps->bbs = PowerStatus::Low; break; case 0x7f: ps->bbs = PowerStatus::VeryLow; break; case 0x02: ps->bbs = PowerStatus::Critical; break; case 0x03: ps->bbs = PowerStatus::Charging; break; case 0x04: ps->bbs = PowerStatus::NotPresent; break; } ::close(fd); diff --git a/library/storage.cpp b/library/storage.cpp index 937908d..3668d29 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_CUSTOM +#ifdef QT_QWS_SHARP #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/qt/qte233-for-opie091-keyboard.patch b/qt/qte233-for-opie091-keyboard.patch index 9d76a64..c1b85b6 100644 --- a/qt/qte233-for-opie091-keyboard.patch +++ b/qt/qte233-for-opie091-keyboard.patch @@ -1,145 +1,145 @@ --- src.orig/kernel/qkeyboard_qws.cpp Mon Mar 18 02:11:25 2002 +++ src/kernel/qkeyboard_qws.cpp Fri Aug 30 04:28:39 2002 @@ -269,7 +269,7 @@ { Qt::Key_O, 'o' , 'O' , 'O'-64 }, { Qt::Key_P, 'p' , 'P' , 'P'-64 }, { Qt::Key_BraceLeft, '[' , '{' , 0xffff }, - { Qt::Key_Escape, ']' , '}' , 0xffff }, + { Qt::Key_BraceRight, ']' , '}' , 0xffff }, { Qt::Key_Return, 13 , 13 , 0xffff }, { Qt::Key_Control, 0xffff , 0xffff , 0xffff }, { Qt::Key_A, 'a' , 'A' , 'A'-64 }, // 30 @@ -394,7 +394,7 @@ bool numLock; #endif bool caps; - bool extended; + int extended; int modifiers; int prevuni; int prevkey; @@ -524,7 +524,7 @@ shift = false; alt = false; ctrl = false; - extended = false; + extended = 0; prevuni = 0; prevkey = 0; caps = FALSE; @@ -561,10 +561,24 @@ int keyCode = Qt::Key_unknown; bool release = false; int keypad = 0; +#if defined(QT_QWS_IPAQ) + static int ipaq_return_pressed = false; // iPAQ Action Key has ScanCode 0x60: 0x60|0x80 = 0xe0 == extended mode 1 ! +#endif + - #if !defined(QT_QWS_CUSTOM) + #if !defined(QT_QWS_SHARP) - if (code == 224) { + if ((code == 224) +#if defined(QT_QWS_IPAQ) + && !ipaq_return_pressed +#endif + ) + { // extended - extended = true; + extended = 1; + return; + } + else if (code == 225) { + // extended 2 + extended = 2; return; } #endif @@ -574,7 +588,7 @@ code &= 0x7f; } - if (extended) { + if (extended == 1) { switch (code) { case 72: keyCode = Qt::Key_Up; @@ -612,6 +626,32 @@ case 53: keyCode = Qt::Key_Slash; break; + case 0x1d: + keyCode = Qt::Key_Control; + break; + case 0x2a: + keyCode = Qt::Key_SysReq; + break; + case 0x38: + keyCode = Qt::Key_Alt; + break; + case 0x5b: + keyCode = Qt::Key_Super_L; + break; + case 0x5c: + keyCode = Qt::Key_Super_R; + break; + case 0x5d: + keyCode = Qt::Key_Menu; + break; + } + } else if (extended == 2) { + switch (code) { + case 0x1d: + return; + case 0x45: + keyCode = Qt::Key_Pause; + break; } } else { - #if defined(QT_QWS_CUSTOM) + #if defined(QT_QWS_SHARP) @@ -650,6 +690,7 @@ repeatable = FALSE; break; case 0x60: + ipaq_return_pressed = !release; keyCode = Key_Return; break; case 0x67: @@ -687,13 +728,19 @@ else repeater->stop(); #endif + + /* + Translate shift+Key_Tab to Key_Backtab + */ + if (( keyCode == Key_Tab ) && shift ) + keyCode = Key_Backtab; } /* Keypad consists of extended keys 53 and 28, and non-extended keys 55 and 71 through 83. */ - if ( extended ? (code == 53 || code == 28) : + if ((extended == 1) ? (code == 53 || code == 28) : (code == 55 || ( code >= 71 && code <= 83 )) ) keypad = Qt::Keypad; @@ -803,7 +850,7 @@ unicode = QWSServer::keyMap()[code].shift_unicode ? QWSServer::keyMap()[code].shift_unicode : 0xffff; else unicode = QWSServer::keyMap()[code].unicode ? QWSServer::keyMap()[code].unicode : 0xffff; - } else { + } else if (extended == 1) { if ( code == 53 ) unicode = '/'; } @@ -829,7 +876,7 @@ prevkey = prevuni = 0; } } - extended = false; + extended = 0; } |