made error output in the same style

- some code style refactoring
This commit is contained in:
vladimir.kuznetsov 2023-02-22 10:01:43 +03:00
parent ddc3fe7807
commit 480b2181f0
13 changed files with 92 additions and 135 deletions

View file

@ -1,7 +1,6 @@
#include <QBuffer>
#include <QImage>
#include <QDataStream>
#include <QMessageBox>
#include "qrcodegen.hpp"
@ -218,9 +217,9 @@ void ShareConnectionLogic::onPushButtonShareWireGuardGenerateClicked()
ErrorCode e = ErrorCode::NoError;
QString cfg = m_configurator->wireguardConfigurator->genWireguardConfig(credentials, container, containerConfig, &e);
if (e) {
QMessageBox::warning(nullptr, APPLICATION_NAME,
tr("Error occurred while configuring server.") + "\n" +
errorString(e));
emit uiLogic()->showWarningMessage(tr("Error occurred while generating the config.") + "\n" +
tr("Error message: ") + errorString(e) + "\n" +
tr("See logs for details."));
return;
}
cfg = m_configurator->processConfigWithExportSettings(serverIndex, container, Proto::WireGuard, cfg);