diff options
Diffstat (limited to 'Swift/QtUI/QtLoginWindow.cpp')
-rw-r--r-- | Swift/QtUI/QtLoginWindow.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp index 72c68b5..42641ba 100644 --- a/Swift/QtUI/QtLoginWindow.cpp +++ b/Swift/QtUI/QtLoginWindow.cpp @@ -22,6 +22,7 @@ #include <QHBoxLayout> #include <qdebug.h> #include <QCloseEvent> +#include <QMessageBox> #include "Swift/Controllers/UIEvents/UIEventStream.h" #include "Swift/Controllers/UIEvents/RequestXMLConsoleUIEvent.h" @@ -390,4 +391,13 @@ void QtLoginWindow::moveEvent(QMoveEvent*) { emit geometryChanged(); } +bool QtLoginWindow::askUserToTrustCertificatePermanently(const String& message) { + QMessageBox dialog(this); + dialog.setText("Invalid server certificate."); + dialog.setInformativeText("The certificate presented by the server is not valid. " + P2QSTRING(message) + " Would you like to permanently trust this certificate? This must only be done if you know it is correct."); + dialog.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + dialog.setDefaultButton(QMessageBox::No); + return dialog.exec() == QMessageBox::Yes; +} + } |