Add possibility to fetch rule details for issues

Allows to fetch further information of an issue and display
it inside the output pane.

Change-Id: I94ec27b9c060dca9f9523d763b8628a2fce7ca59
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2023-01-13 14:38:39 +01:00
parent 134b71a45a
commit 5fb06bdeb9
7 changed files with 63 additions and 2 deletions

View File

@@ -13,6 +13,7 @@
#include <QLabel>
#include <QScrollArea>
#include <QStackedWidget>
#include <QTextBrowser>
namespace Axivion::Internal {
@@ -98,6 +99,8 @@ AxivionOutputPane::AxivionOutputPane(QObject *parent)
m_outputWidget = new QStackedWidget;
DashboardWidget *dashboardWidget = new DashboardWidget(m_outputWidget);
m_outputWidget->addWidget(dashboardWidget);
QTextBrowser *browser = new QTextBrowser(m_outputWidget);
m_outputWidget->addWidget(browser);
}
AxivionOutputPane::~AxivionOutputPane()
@@ -182,4 +185,15 @@ void AxivionOutputPane::updateDashboard()
}
}
void AxivionOutputPane::updateAndShowRule(const QString &ruleHtml)
{
if (auto browser = static_cast<QTextBrowser *>(m_outputWidget->widget(1))) {
browser->setText(ruleHtml);
if (!ruleHtml.isEmpty()) {
m_outputWidget->setCurrentIndex(1);
popup(Core::IOutputPane::NoModeSwitch);
}
}
}
} // Axivion::Internal