From: Daniel Klaffenbach Date: Tue, 5 Oct 2010 19:21:37 +0000 (+0200) Subject: Do not set maxfreq twice X-Git-Tag: v0.3.4~5 X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=480b26db06bb34351d588cd0639e51713beeb47f;hp=95038e862f3295437cd7a7567115690c6d37939c;p=qcpufreq Do not set maxfreq twice --- diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3c3b98a..c9fecb4 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -110,6 +110,12 @@ void MainWindow::about() void MainWindow::adjustFreq() { int newmax = getScalingFreq( ui->freq_adjust->sliderPosition() ); + + if (newmax == getMaxFreq() ) { + //we do not need to change anything in this case + return; + } + QString max; //maxfreq should not be smaller than minfreq, because we do not want to decrease minfreq @@ -461,7 +467,7 @@ void MainWindow::setSmartReflex() if ( getSmartReflexState() == 1 ) callHelper( "set_sr", "off"); else { - QMaemo5InformationBox::information(this, tr( "SmartReflex support is known to be unstable on some devices and may cause random reboots." )); + QMaemo5InformationBox::information(this, tr( "SmartReflex support is known to be unstable on some devices and may cause random reboots." ), 0); callHelper( "set_sr", "on"); }