Axivion: Move query error handling closer to query code

Change-Id: I6c57c0578b284f20e23312bf748c5efbe0ac3c3e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2023-07-14 17:05:24 +02:00
parent 19bc9e69c9
commit aa093c1e91
3 changed files with 23 additions and 22 deletions

View File

@@ -13,7 +13,6 @@
#include <coreplugin/editormanager/documentmodel.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/messagemanager.h>
#include <extensionsystem/pluginmanager.h>
@@ -31,7 +30,6 @@
#include <utils/utilsicons.h>
#include <QAction>
#include <QMessageBox>
#include <QTimer>
constexpr char AxivionTextMarkId[] = "AxivionTextMark";
@@ -150,24 +148,6 @@ AxivionProjectSettings *AxivionPlugin::projectSettings(ProjectExplorer::Project
return dd->projectSettings(project);
}
bool AxivionPlugin::handleCertificateIssue()
{
QTC_ASSERT(dd, return false);
const QString serverHost = QUrl(dd->m_axivionSettings.server.dashboard).host();
if (QMessageBox::question(Core::ICore::dialogParent(), Tr::tr("Certificate Error"),
Tr::tr("Server certificate for %1 cannot be authenticated.\n"
"Do you want to disable SSL verification for this server?\n"
"Note: This can expose you to man-in-the-middle attack.")
.arg(serverHost))
!= QMessageBox::Yes) {
return false;
}
dd->m_axivionSettings.server.validateCert = false;
emit s_instance->settingsChanged();
return true;
}
void AxivionPlugin::fetchProjectInfo(const QString &projectName)
{
QTC_ASSERT(dd, return);