The musredit help system is using now the system default web-browser. This simplifies things, especially the qtwebengine package is not needed anymore.

This commit is contained in:
2020-12-22 17:31:42 +01:00
parent e5404d1370
commit 56917d3fec
15 changed files with 124 additions and 386 deletions

View File

@@ -33,8 +33,8 @@
#include <QLineEdit>
#include <QPushButton>
#include <QMessageBox>
#include "PHelp.h"
#include <QDesktopServices>
#include <QUrl>
#include "PGetFourierBlockDialog.h"
@@ -132,12 +132,14 @@ void PGetFourierBlockDialog::helpContent()
if (fHelpUrl.isEmpty()) {
QMessageBox::information(this, "**INFO**", "Will eventually show a help window");
} else {
#ifdef _WIN32GCC
QMessageBox::information(this, "**INFO**", "If a newer Qt version was available, a help window would be shown!");
#else
PHelp *help = new PHelp(fHelpUrl);
help->show();
#endif // _WIN32GCC
bool ok = QDesktopServices::openUrl(QUrl(fHelpUrl, QUrl::TolerantMode));
if (!ok) {
QString msg = QString("<p>Sorry: Couldn't open default web-browser for the help.<br>Please try: <a href=\"%1\">musrfit docu</a> in your web-browser.").arg(fHelpUrl);
QMessageBox::critical( nullptr,
tr("Fatal Error"),
msg,
tr("Quit") );
}
}
}