author | mickeyl <mickeyl> | 2003-05-16 19:07:01 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-05-16 19:07:01 (UTC) |
commit | 1ac65aca5d1219e537238330501bc441dd2a3324 (patch) (side-by-side diff) | |
tree | f60f613028dbef184e4b2fd31c5499d1e07c6e6b | |
parent | e7dc14955879dfabf5093b06784402c4525eed2a (diff) | |
download | opie-1ac65aca5d1219e537238330501bc441dd2a3324.zip opie-1ac65aca5d1219e537238330501bc441dd2a3324.tar.gz opie-1ac65aca5d1219e537238330501bc441dd2a3324.tar.bz2 |
enable opie to compile against a non-patched qt 2.3.2
to prepare the possibility of building an opie 1.0 feed for the sharp rom
-rw-r--r-- | library/qpeapplication.cpp | 2 | ||||
-rw-r--r-- | library/qpeapplication.h | 11 | ||||
-rw-r--r-- | library/qt_override.cpp | 3 | ||||
-rw-r--r-- | library/qt_override_p.h | 10 |
4 files changed, 19 insertions, 7 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index f4db1ab..19adb00 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -958,12 +958,13 @@ void QPEApplication::setDefaultRotation( int r ) */ void QPEApplication::applyStyle() { Config config( "qpe" ); config.setGroup( "Appearance" ); + #if QT_VERSION > 233 // don't block ourselves ... Opie::force_appearance = 0; static QString appname = Opie::binaryName ( ); QStringList ex = config. readListEntry ( "NoStyle", ';' ); @@ -1030,12 +1031,13 @@ void QPEApplication::applyStyle() setFont ( QFont ( ff, fs ), true ); // revert to global blocking policy ... Opie::force_appearance = config. readBoolEntry ( "ForceStyle", false ) ? Opie::Force_All : Opie::Force_None; Opie::force_appearance &= ~nostyle; + #endif } void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data ) { #ifdef Q_WS_QWS QDataStream stream( data, IO_ReadOnly ); diff --git a/library/qpeapplication.h b/library/qpeapplication.h index e35c008..65a6d33 100644 --- a/library/qpeapplication.h +++ b/library/qpeapplication.h @@ -115,15 +115,15 @@ protected: virtual void restart(); virtual void shutdown(); bool eventFilter( QObject *, QEvent * ); void timerEvent( QTimerEvent * ); bool raiseAppropriateWindow(); virtual void tryQuit(); - +#if QT_VERSION > 233 virtual void polish ( QWidget * ); // this is actually implemented in qt_override.cpp (!) - +#endif private: #ifndef QT_NO_TRANSLATION void installTranslation( const QString& baseName ); #endif void mapToDefaultAction( QWSKeyEvent *ke, int defKey ); @@ -180,14 +180,19 @@ inline Transformation DegToTrans ( int d ) * Differs from setDefaultRotation in that 1) it rotates currently running apps, * and 2) does not set deforient or save orientation to qpe.conf. */ inline void QPEApplication::setCurrentRotation( int r ) { + // setTransformation has been introduced in Qt/Embedded 2.3.4 snapshots + // for compatibility with the SharpROM use fallback to setDefaultTransformation() + #if QT_VERSION > 233 Transformation e = DegToTrans( r ); - setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 ); qApp->desktop()->qwsDisplay()->setTransformation( e ); + #else + setDefaultRotation( r ); + #endif } #endif diff --git a/library/qt_override.cpp b/library/qt_override.cpp index 02c48a0..edda874 100644 --- a/library/qt_override.cpp +++ b/library/qt_override.cpp @@ -9,13 +9,13 @@ #include <stdio.h> #include <limits.h> #include <sys/param.h> // for toolchains with old libc headers #include "qt_override_p.h" - +#if QT_VERSION > 233 struct color_fix_t { char *m_app; char *m_class; char *m_name; QColorGroup::ColorRole m_set; @@ -165,6 +165,7 @@ void QApplication::qwsSetDecoration ( QWSDecoration *deco ) if ( Opie::force_appearance & Opie::Force_Decoration ) delete deco; else QApplication::qwsSetDecoration_NonWeak ( deco ); } +#endif
\ No newline at end of file diff --git a/library/qt_override_p.h b/library/qt_override_p.h index d11917c..cb05d15 100644 --- a/library/qt_override_p.h +++ b/library/qt_override_p.h @@ -1,21 +1,25 @@ #ifndef __QT_OVERRIDE_H__ #define __QT_OVERRIDE_H__ +#if QT_VERSION > 233 + namespace Opie { - + enum ForceAppearance { Force_Style = 0x01, Force_Font = 0x02, Force_Decoration = 0x04, - - Force_All = 0xff, + + Force_All = 0xff, Force_None = 0x00, }; extern const char *binaryName ( ); extern int force_appearance; } +#endif // (QT_VERSION >233) + #endif |