Helpviewer: split up help files into regular/power kernel help
authorDaniel Klaffenbach <danielklaffenbach@gmail.com>
Sun, 6 Mar 2011 20:03:01 +0000 (21:03 +0100)
committerDaniel Klaffenbach <danielklaffenbach@gmail.com>
Sun, 6 Mar 2011 20:03:01 +0000 (21:03 +0100)
src/help_en.html
src/help_en_power.html [new file with mode: 0644]
src/helpwindow.cpp
src/src.pro

index 2536f50..5f15787 100644 (file)
@@ -6,28 +6,17 @@ This enables you to overclock your CPU easily (only on power kernel), but of cou
 <br><br>
 
 <hr>
-<strong>Notes for official kernel users:</strong>
+<strong>Notes:</strong>
 <ul>
  <li>Changes are lost after:
   <ul>
    <li>Rebooting the device</li>
-   <li>Making or receiving a call (only on official kernel)</li>
+   <li>Making or receiving a call</li>
   </ul>
  </li>
- If you want to change your CPU frequency or SmartReflex™ settings permanently, you need to edit <em>/etc/pmconfig</em>. Only edit this file if you know what you are doing!
- </li>
- <li>When the current CPU frequency setting is equal to the minimum CPU frequency the kernel might use the next frequency scaling step as the maximum frequency. For instance, if you set your maximum frequency to 250MHz the official kernel will actually use 500MHz as the maximum frequency. This is a kernel problem.</li>
- <li>SmartReflex™ is known to be unstable on some devices and may cause random reboots.</li>
- <li>Starting with PR 1.2, Nokia has disabled "VDD2 SR" in order to make the device more stable. This is why QCPUFreq only enables VDD1 SmartReflex™.</li>
- <li>On official kernels the CPU temperature is very inaccurate.</li>
- <li>The value of the CPU temperature might sometimes be "Unknown". This is yet another kernel problem and not a bug in QCPUFreq.</li>
-</ul>
-<br><br>
-<strong>Notes for power kernel users:</strong>
-<ul>
- <li>In order to keep the current maximum frequency after reboot, select <strong>Save</strong> in the QCPUFreq menu.</li>
+ <li>If you want to change your CPU frequency or SmartReflex™ settings permanently, you need to edit <em>/etc/pmconfig</em>. Only edit this file if you know what you are doing! </li>
+ <li>When the current CPU frequency setting is equal to the minimum CPU frequency the kernel might use the next frequency scaling step as the maximum frequency. For instance, if you set your maximum frequency to 250MHz the kernel will actually use 500MHz as the maximum frequency. This is a kernel problem.</li>
  <li>SmartReflex™ is known to be unstable on some devices and may cause random reboots.</li>
- <li>Starting with PR 1.2, Nokia has disabled "VDD2 SR" in order to make the device more stable. This is why QCPUFreq only enables VDD1 SmartReflex™.</li>
- <li>The CPU temperature might be very inaccurate. To get a much more precise value, you can enable automatic <em>bq27x00_battery</em> module loading in QCPUFreq settings.</li>
+ <li>The CPU temperature can be inaccurate.</li>
  <li>The value of the CPU temperature might sometimes be "Unknown". This is yet another kernel problem and not a bug in QCPUFreq.</li>
-</ul>
+</ul>
\ No newline at end of file
diff --git a/src/help_en_power.html b/src/help_en_power.html
new file mode 100644 (file)
index 0000000..8e07500
--- /dev/null
@@ -0,0 +1,15 @@
+<h1>QCPUFreq Help</h1>
+
+This application allows you to adjust your maximum CPU speed.
+<br><br>
+This enables you to overclock your CPU easily, but of course you can also underclock the CPU if desired. Underclocking might save some battery power if you are running applications like emulators, which cause your CPU to always run at full speed when it is really not required. Please note that lowering the maximum CPU frequency does not always save battery power and is not always the best choice!
+<br><br>
+
+<hr>
+<strong>Notes:</strong>
+<ul>
+ <li>In order to keep the current maximum frequency after reboot, select <strong>Save</strong> in the QCPUFreq menu.</li>
+ <li>SmartReflex™ is known to be unstable on some devices and may cause random reboots.</li>
+ <li>The CPU temperature might be very inaccurate. To get a much more precise value, you can enable automatic <em>bq27x00_battery</em> module loading in QCPUFreq settings.</li>
+ <li>The value of the CPU temperature might sometimes be "Unknown". This is yet another kernel problem and not a bug in QCPUFreq.</li>
+</ul>
index 972ad92..ec5b1c5 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "helpwindow.h"
 #include "ui_helpwindow.h"
+#include "settings.h"
 
 #include <QFile>
 #include <QLocale>
@@ -52,14 +53,24 @@ void HelpWindow::setHelpText()
     locale = tmp.first();
 
     QString path = HELPPATH;
+    Settings settings;
+    QString suffix;
+
+    //determine if we need to display the help file for power kernel users
+    if (settings.usePowerKernel()) {
+        suffix = "_power.html";
+    } else
+    {
+        suffix = ".html";
+    }
 
     //open help text
-    QFile help( path+"help_" + locale + ".html" );
+    QFile help( path + "help_" + locale + suffix );
 
     //open the file
     if ( !help.exists() || !help.open( QIODevice::ReadOnly ) ) {
         //try to open the file in english language instead
-        help.setFileName( path+"help_en.html" );
+        help.setFileName( path + "help_en" + suffix );
         if ( !help.exists() || !help.open( QIODevice::ReadOnly ) ) {
             QMessageBox::critical(this, tr("QCPUFreq"), tr("Cannot open help file!"));
             return;
index 8cd94ed..3ccb09d 100644 (file)
@@ -77,7 +77,7 @@ unix {
        locale_zh.files += zh.qm help_zh.html
 
     help_en.path = /opt/usr/share/qcpufreq
-       help_en.files += help_en.html
+       help_en.files += help_en.html help_en_power.html
 
 }