summaryrefslogtreecommitdiff
path: root/horizonwizard.cc
diff options
context:
space:
mode:
Diffstat (limited to 'horizonwizard.cc')
-rw-r--r--horizonwizard.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/horizonwizard.cc b/horizonwizard.cc
index 75a5e8c..53b40b5 100644
--- a/horizonwizard.cc
+++ b/horizonwizard.cc
@@ -1,7 +1,9 @@
#include "horizonwizard.hh"
#include "horizonhelpwindow.hh"
+#include <QDebug>
#include <QFile>
+#include <QMessageBox>
#include <map>
#include <string>
@@ -50,6 +52,17 @@ HorizonWizard::HorizonWizard(QWidget *parent) : QWizard(parent)
QObject::connect(this, (void (QWizard:: *)(void))&QWizard::helpRequested,
[=](void) {
+ if(help_id_map.find(currentId()) == help_id_map.end())
+ {
+ qDebug() << "no help available for " << currentId();
+ QMessageBox nohelp(QMessageBox::Warning,
+ tr("No Help Available"),
+ tr("Help is not available for the current page. Consult the Installation Guide for more information."),
+ QMessageBox::Ok,
+ this);
+ nohelp.exec();
+ return;
+ }
string helppath = ":/wizard_help/resources/" +
help_id_map.at(currentId()) + "-help.txt";
QFile helpfile(helppath.c_str());