summaryrefslogtreecommitdiff
path: root/library/qpeapplication.h
Unidiff
Diffstat (limited to 'library/qpeapplication.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
index 167fe69..cff3e43 100644
--- a/library/qpeapplication.h
+++ b/library/qpeapplication.h
@@ -205,13 +205,16 @@ inline Transformation DegToTrans ( int d )
205inline void QPEApplication::setCurrentRotation( int r ) 205inline void QPEApplication::setCurrentRotation( int r )
206{ 206{
207 // setTransformation has been introduced in Qt/Embedded 2.3.4 snapshots 207 // setTransformation has been introduced in Qt/Embedded 2.3.4 snapshots
208 // for compatibility with the SharpROM use fallback to setDefaultTransformation() 208 // for compatibility with the SharpROM use fallback to setDefaultTransformation()
209#if QT_VERSION > 233 209#if QT_VERSION > 233
210 Transformation e = DegToTrans( r ); 210 Transformation e = DegToTrans( r );
211 ::setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 ); 211 QCString old = getenv("QWS_DISPLAY") ? getenv( "QWS_DISPLAY" ) : "Transformed";
212 int j = 0;
213 QString driver( old.left( ( ( j = old.find( ':' ) ) >= 0 ) ? j : old.size() ).data() );
214 ::setenv( "QWS_DISPLAY", QString( "%1:Rot%2:0" ).arg( driver ).arg( r ).latin1(), 1 );
212 qApp->desktop()->qwsDisplay()->setTransformation( e ); 215 qApp->desktop()->qwsDisplay()->setTransformation( e );
213#else 216#else
214 setDefaultRotation( r ); 217 setDefaultRotation( r );
215#endif 218#endif
216} 219}
217 220