-rw-r--r-- | libopie2/opiecore/device/odevice_jornada.cpp | 11 |
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 | |||
@@ -161,9 +161,10 @@ bool Jornada::setDisplayBrightness( int bright ) | |||
161 | 161 | ||
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 | ||
169 | return res; | 170 | return res; |
@@ -175,7 +176,7 @@ bool Jornada::setDisplayStatus ( bool on ) | |||
175 | bool res = false; | 176 | bool res = false; |
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 | ||
181 | return res; | 182 | return res; |