summaryrefslogtreecommitdiff
path: root/library/applnk.cpp
Side-by-side diff
Diffstat (limited to 'library/applnk.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/applnk.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/library/applnk.cpp b/library/applnk.cpp
index c82d3b9..874a1b6 100644
--- a/library/applnk.cpp
+++ b/library/applnk.cpp
@@ -687,5 +687,7 @@ void AppLnk::execute(const QStringList& args) const
int rot = QPEApplication::defaultRotation();
+ int j = 0;
rot = (rot+mRotation.toInt())%360;
- QCString old = getenv("QWS_DISPLAY");
- setenv("QWS_DISPLAY", QString("Transformed:Rot%1:0").arg(rot), 1);
+ QCString old = getenv( "QWS_DISPLAY" ) ? getenv( "QWS_DISPLAY" ) : "Transformed";
+ QString driver( old.left( ( ( j = old.find( ':' ) ) >= 0 ) ? j : old.size() ).data() );
+ setenv( "QWS_DISPLAY", QString( "%1:Rot%2:0" ).arg( driver ).arg( rot ), 1 );
invoke(args);