refactor: handle error suppression in gui not message stack
This commit is contained in:
parent
a37d30c6ab
commit
0446db93e6
2 changed files with 5 additions and 4 deletions
|
|
@ -1239,11 +1239,15 @@ void MainWindow::remoteHostChanged(const QString &newRemoteHost)
|
||||||
|
|
||||||
void MainWindow::showClientError(deskflow::client::ErrorType error, const QString &address)
|
void MainWindow::showClientError(deskflow::client::ErrorType error, const QString &address)
|
||||||
{
|
{
|
||||||
|
if (!Settings::value(Settings::Gui::ShowGenericClientFailureDialog).toBool())
|
||||||
|
return;
|
||||||
|
|
||||||
if (m_clientErrorVisible)
|
if (m_clientErrorVisible)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_clientErrorVisible = true;
|
m_clientErrorVisible = true;
|
||||||
deskflow::gui::messages::showClientConnectError(this, error, address);
|
|
||||||
showAndActivate();
|
showAndActivate();
|
||||||
|
deskflow::gui::messages::showClientConnectError(this, error, address);
|
||||||
m_clientErrorVisible = false;
|
m_clientErrorVisible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -222,9 +222,6 @@ void showClientConnectError(QWidget *parent, deskflow::client::ErrorType error,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Settings::value(Settings::Gui::ShowGenericClientFailureDialog).toBool())
|
|
||||||
return;
|
|
||||||
|
|
||||||
auto dialog = QMessageBox(parent);
|
auto dialog = QMessageBox(parent);
|
||||||
dialog.setWindowTitle(title);
|
dialog.setWindowTitle(title);
|
||||||
dialog.setText(message);
|
dialog.setText(message);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue