summaryrefslogtreecommitdiff
path: root/libopie2
Side-by-side diff
Diffstat (limited to 'libopie2') (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 )
if ( !bright )
- cmdline = QString().sprintf( "echo 4 > /sys/class/backlight/sa1100fb/power");
+ cmdline = QString::fromLatin1( "echo 4 > /sys/class/backlight/sa1100fb/power");
else
- cmdline = QString().sprintf( "echo 0 > /sys/class/backlight/sa1100fb/power; echo %d > /sys/class/backlight/sa1100fb/brightness", bright );
+ cmdline = QString::fromLatin1( "echo 0 > /sys/class/backlight/sa1100fb/power; echo %1 > /sys/class/backlight/sa1100fb/brightness" ).arg( bright );
- res = ( ::system( (const char*) cmdline ) == 0 );
+ // No Global::shellQuote as we gurantee it to be sane
+ res = ( ::system( QFile::encodeName(cmdline) ) == 0 );
@@ -176,5 +177,5 @@ bool Jornada::setDisplayStatus ( bool on )
- 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" );
+ 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" );
- res = ( ::system( (const char*) cmdline ) == 0 );
+ res = ( ::system( QFile::encodeName(cmdline) ) == 0 );