load filters in adblock dialog even when disabled + other minor fix

This commit is contained in:
Martin Rotter 2021-05-21 11:00:15 +02:00
parent 6caea3a2c7
commit 4e6c6d0600
2 changed files with 5 additions and 2 deletions

View file

@ -89,7 +89,8 @@ void AdBlockDialog::testConfiguration() {
<< QUOTE_W_SPACE_DOT(ex.message());
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Error,
tr("There is error, check application log for more details and "
"head to online documentation.\n\nError: %1").arg(ex.message()),
"head to online documentation. Also make sure that Node.js is installed."
"\n\nError: %1").arg(ex.message()),
tr("ERROR!"));
}

View file

@ -316,7 +316,9 @@ QProcess* AdBlockManager::restartServer(int port) {
proc->setProcessEnvironment(pe);
proc->setProcessChannelMode(QProcess::ProcessChannelMode::ForwardedErrorChannel);
if (!proc->open() || proc->state() == QProcess::ProcessState::NotRunning) {
if (!proc->open() ||
proc->state() == QProcess::ProcessState::NotRunning ||
proc->error() != QProcess::ProcessError::UnknownError) {
auto ers = proc->errorString();
proc->deleteLater();