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:
+3
-18
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user