-rw-r--r-- | library/qpeapplication.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/library/qpeapplication.h b/library/qpeapplication.h index e35c008..65a6d33 100644 --- a/library/qpeapplication.h +++ b/library/qpeapplication.h @@ -105,35 +105,35 @@ signals: private slots: void systemMessage( const QCString &msg, const QByteArray &data ); void pidMessage( const QCString &msg, const QByteArray &data ); void removeSenderFromStylusDict(); void hideOrQuit(); protected: bool qwsEventFilter( QWSEvent * ); void internalSetStyle( const QString &style ); void prepareForTermination(bool willrestart); 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 ); #if defined(Q_WS_QWS) && !defined(QT_NO_COP) QCopChannel *sysChannel; QCopChannel *pidChannel; #endif QPEApplicationData *d; bool reserved_sh; @@ -170,24 +170,29 @@ inline int TransToDeg ( Transformation t ) } inline Transformation DegToTrans ( int d ) { Transformation t = static_cast<Transformation>( d / 90 ); return t; } /* * Set current rotation of Opie, and rotation for newly started apps. * 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 |