#include "helpwindow.h"
#include "ui_helpwindow.h"
+#include "settings.h"
#include <QFile>
#include <QLocale>
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;