From 1ac65aca5d1219e537238330501bc441dd2a3324 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Fri, 16 May 2003 19:07:01 +0000 Subject: 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 --- diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index f4db1ab..19adb00 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -961,6 +961,7 @@ void QPEApplication::applyStyle() Config config( "qpe" ); config.setGroup( "Appearance" ); + #if QT_VERSION > 233 // don't block ourselves ... Opie::force_appearance = 0; @@ -1033,6 +1034,7 @@ void QPEApplication::applyStyle() // 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 ) diff --git a/library/qpeapplication.h b/library/qpeapplication.h index e35c008..65a6d33 100644 --- a/library/qpeapplication.h +++ b/library/qpeapplication.h @@ -118,9 +118,9 @@ protected: 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 ); @@ -183,10 +183,15 @@ inline Transformation DegToTrans ( int d ) 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 } 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 @@ -12,7 +12,7 @@ #include "qt_override_p.h" - +#if QT_VERSION > 233 struct color_fix_t { char *m_app; @@ -168,3 +168,4 @@ void QApplication::qwsSetDecoration ( QWSDecoration *deco ) 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,14 +1,16 @@ #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, }; @@ -18,4 +20,6 @@ extern int force_appearance; } +#endif // (QT_VERSION >233) + #endif -- cgit v0.9.0.2