Switched from QtHelp to using straight HTML files for help.

This is because AppImage (for linux) is readonly and QtHelp requires
write access. But, HTML files shouldn't.
This commit is contained in:
Collin Kidder
2019-08-18 18:52:15 -04:00
parent b6a15a28cd
commit ca9b83ddc9
80 changed files with 16502 additions and 214 deletions
+3 -18
View File
@@ -11,13 +11,6 @@ HelpWindow::HelpWindow(QWidget *parent) :
ui->setupUi(this);
setWindowFlags(Qt::Window);
m_helpEngine = new QHelpEngineCore(QApplication::applicationDirPath() +"/SavvyCAN.qhc", this);
if (!m_helpEngine->setupData()) {
delete m_helpEngine;
m_helpEngine = nullptr;
qDebug() << "Could not load help file!";
}
readSettings();
}
@@ -66,17 +59,9 @@ HelpWindow* HelpWindow::getRef()
void HelpWindow::showHelp(QString help)
{
if (m_helpEngine) {
QString url = "qthelp://org.sphinx.savvycan.189/doc/" + help;
qDebug() << "Searching for " << url;
QByteArray helpData = m_helpEngine->fileData(QUrl(url));
qDebug() << "Help file size: " << helpData.length();
ui->textHelp->setText(helpData);
}
else
{
qDebug() << "Help engine not loaded!";
}
QString url = QCoreApplication::applicationDirPath() + "/help/" + help;
qDebug() << "Searching for " << url;
ui->textHelp->setSource(url);
readSettings();
self->show();