forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user