switch adblock off if it encounters fatal process error
This commit is contained in:
parent
4df20e70ed
commit
23d3517c08
4 changed files with 6 additions and 3 deletions
|
@ -30,7 +30,7 @@
|
||||||
<url type="donation">https://martinrotter.github.io/donate/</url>
|
<url type="donation">https://martinrotter.github.io/donate/</url>
|
||||||
<content_rating type="oars-1.1" />
|
<content_rating type="oars-1.1" />
|
||||||
<releases>
|
<releases>
|
||||||
<release version="4.0.0" date="2021-08-26"/>
|
<release version="4.0.0" date="2021-08-31"/>
|
||||||
</releases>
|
</releases>
|
||||||
<content_rating type="oars-1.0">
|
<content_rating type="oars-1.0">
|
||||||
<content_attribute id="violence-cartoon">none</content_attribute>
|
<content_attribute id="violence-cartoon">none</content_attribute>
|
||||||
|
|
|
@ -599,6 +599,8 @@ void Application::onAdBlockFailure() {
|
||||||
[=]() {
|
[=]() {
|
||||||
m_webFactory->adBlock()->showDialog();
|
m_webFactory->adBlock()->showDialog();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
qApp->settings()->setValue(GROUP(AdBlock), AdBlock::AdBlockEnabled, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -79,7 +79,9 @@ bool IOFactory::startProcessDetached(const QString& program, const QStringList&
|
||||||
process.setArguments(arguments);
|
process.setArguments(arguments);
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
|
#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
|
||||||
process.setNativeArguments(native_arguments);
|
if (!native_arguments.isEmpty()) {
|
||||||
|
process.setNativeArguments(native_arguments);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
if (arguments.isEmpty() && !native_arguments.isEmpty()) {
|
if (arguments.isEmpty() && !native_arguments.isEmpty()) {
|
||||||
process.setArguments({ native_arguments });
|
process.setArguments({ native_arguments });
|
||||||
|
|
|
@ -110,7 +110,6 @@ void AdBlockDialog::onAdBlockEnabledChanged(bool enabled) {
|
||||||
|
|
||||||
void AdBlockDialog::onAdBlockProcessTerminated() {
|
void AdBlockDialog::onAdBlockProcessTerminated() {
|
||||||
m_ui.m_cbEnable->setChecked(false);
|
m_ui.m_cbEnable->setChecked(false);
|
||||||
|
|
||||||
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Error,
|
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Error,
|
||||||
tr("There is error, check application log for more details and "
|
tr("There is error, check application log for more details and "
|
||||||
"head to online documentation. Also make sure that Node.js is installed."),
|
"head to online documentation. Also make sure that Node.js is installed."),
|
||||||
|
|
Loading…
Add table
Reference in a new issue