Skip to content

Commit 4384a8c

Browse files
authored
Show connection warning when service is not available (#1239)
IB-7912 Signed-off-by: Raul Metsma <[email protected]>
1 parent e321e6f commit 4384a8c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

client/DigiDoc.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,19 @@ struct ServiceConfirmation final: public ContainerOpenCB
5252
ServiceConfirmation(QWidget *_parent): parent(_parent) {}
5353
bool validateOnline() const final {
5454
if(!CheckConnection().check())
55-
return false;
55+
return dispatchToMain([this] {
56+
WarningDialog::show(parent, DigiDoc::tr("Connecting to SiVa server failed! Please check your internet connection and network settings."));
57+
return false;
58+
});
5659
return dispatchToMain([this] {
5760
auto *dlg = new WarningDialog(DigiDoc::tr("This type of signed document will be transmitted to the "
5861
"Digital Signature Validation Service SiVa to verify the validity of the digital signature. "
5962
"Read more information about transmitted data to Digital Signature Validation service from "
6063
"<a href=\"https://www.id.ee/en/article/data-protection-conditions-for-the-id-software-of-the-national-information-system-authority/\">here</a>.<br />"
6164
"Do you want to continue?"), parent);
6265
dlg->setCancelText(WarningDialog::Cancel);
63-
dlg->addButton(WarningDialog::YES, ContainerSave);
64-
return dlg->exec() == ContainerSave;
66+
dlg->addButton(WarningDialog::YES, 1);
67+
return dlg->exec() == 1;
6568
});
6669
}
6770
Q_DISABLE_COPY(ServiceConfirmation)

0 commit comments

Comments
 (0)