switch adblock off if it encounters fatal process error

This commit is contained in:
Martin Rotter 2021-08-31 08:48:17 +02:00
parent 4df20e70ed
commit 23d3517c08
4 changed files with 6 additions and 3 deletions

View File

@ -30,7 +30,7 @@
<url type="donation">https://martinrotter.github.io/donate/</url>
<content_rating type="oars-1.1" />
<releases>
<release version="4.0.0" date="2021-08-26"/>
<release version="4.0.0" date="2021-08-31"/>
</releases>
<content_rating type="oars-1.0">
<content_attribute id="violence-cartoon">none</content_attribute>

View File

@ -599,6 +599,8 @@ void Application::onAdBlockFailure() {
[=]() {
m_webFactory->adBlock()->showDialog();
});
qApp->settings()->setValue(GROUP(AdBlock), AdBlock::AdBlockEnabled, false);
}
#endif

View File

@ -79,7 +79,9 @@ bool IOFactory::startProcessDetached(const QString& program, const QStringList&
process.setArguments(arguments);
#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
process.setNativeArguments(native_arguments);
if (!native_arguments.isEmpty()) {
process.setNativeArguments(native_arguments);
}
#else
if (arguments.isEmpty() && !native_arguments.isEmpty()) {
process.setArguments({ native_arguments });

View File

@ -110,7 +110,6 @@ void AdBlockDialog::onAdBlockEnabledChanged(bool enabled) {
void AdBlockDialog::onAdBlockProcessTerminated() {
m_ui.m_cbEnable->setChecked(false);
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Error,
tr("There is error, check application log for more details and "
"head to online documentation. Also make sure that Node.js is installed."),