summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_jornada.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/libopie2/opiecore/device/odevice_jornada.cpp b/libopie2/opiecore/device/odevice_jornada.cpp
index 5f95e42..7d080ba 100644
--- a/libopie2/opiecore/device/odevice_jornada.cpp
+++ b/libopie2/opiecore/device/odevice_jornada.cpp
@@ -162,7 +162,8 @@ bool Jornada::setDisplayBrightness( int bright )
162 if ( !bright ) 162 if ( !bright )
163 cmdline = QString().sprintf( "echo 4 > /sys/class/backlight/sa1100fb/power"); 163 cmdline = QString::fromLatin1( "echo 4 > /sys/class/backlight/sa1100fb/power");
164 else 164 else
165 cmdline = QString().sprintf( "echo 0 > /sys/class/backlight/sa1100fb/power; echo %d > /sys/class/backlight/sa1100fb/brightness", bright ); 165 cmdline = QString::fromLatin1( "echo 0 > /sys/class/backlight/sa1100fb/power; echo %1 > /sys/class/backlight/sa1100fb/brightness" ).arg( bright );
166 166
167 res = ( ::system( (const char*) cmdline ) == 0 ); 167 // No Global::shellQuote as we gurantee it to be sane
168 res = ( ::system( QFile::encodeName(cmdline) ) == 0 );
168 169
@@ -176,5 +177,5 @@ bool Jornada::setDisplayStatus ( bool on )
176 177
177 QString cmdline = QString( "echo %1 > /sys/class/lcd/sa1100fb/power; echo %2 > /sys/class/backlight/sa1100fb/power").arg( on ? "0" : "4" ).arg( on ? "0" : "4" ); 178 QString cmdline = QString::fromLatin1( "echo %1 > /sys/class/lcd/sa1100fb/power; echo %2 > /sys/class/backlight/sa1100fb/power").arg( on ? "0" : "4" ).arg( on ? "0" : "4" );
178 179
179 res = ( ::system( (const char*) cmdline ) == 0 ); 180 res = ( ::system( QFile::encodeName(cmdline) ) == 0 );
180 181