summaryrefslogtreecommitdiff
path: root/library
Side-by-side diff
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp2
-rw-r--r--library/qpeapplication.h11
-rw-r--r--library/qt_override.cpp3
-rw-r--r--library/qt_override_p.h10
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
@@ -960,8 +960,9 @@ 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 ( );
@@ -1032,8 +1033,9 @@ 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
@@ -117,11 +117,11 @@ protected:
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
@@ -182,12 +182,17 @@ 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
}
#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
@@ -11,9 +11,9 @@
#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;
@@ -167,4 +167,5 @@ void QApplication::qwsSetDecoration ( QWSDecoration *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,15 +1,17 @@
#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 ( );
@@ -17,5 +19,7 @@ extern const char *binaryName ( );
extern int force_appearance;
}
+#endif // (QT_VERSION >233)
+
#endif