Only display overclocking warning when enabling OC.
authorDaniel Klaffenbach <danielklaffenbach@gmail.com>
Wed, 3 Nov 2010 22:23:33 +0000 (23:23 +0100)
committerDaniel Klaffenbach <danielklaffenbach@gmail.com>
Wed, 3 Nov 2010 22:23:33 +0000 (23:23 +0100)
The previous code also displayed the warning when disabling
overclocking.

src/settings.cpp

index 80eae60..d660d0c 100644 (file)
@@ -81,13 +81,13 @@ void Settings::save()
   */
 void Settings::showOverclockingWarning()
 {
-
+    if (ui->checkBox_oc->isChecked()) {
 #if defined(Q_WS_MAEMO_5)
-    QMaemo5InformationBox::information(this, tr( "Please note that overclocking voids your warranty and may break your device! Be careful!"), 0);
+        QMaemo5InformationBox::information(this, tr( "Please note that overclocking voids your warranty and may break your device! Be careful!"), 0);
 #else
-    QMessageBox::warning(this, tr("Warning"), tr("Please note that overclocking voids your warranty and may break your device! Be careful!"));
+        QMessageBox::warning(this, tr("Warning"), tr("Please note that overclocking voids your warranty and may break your device! Be careful!"));
 #endif
-
+    }
 }