forked from qt-creator/qt-creator
Axivion: Fix html content with the issue info
Cut the unwanted content of the html received from the server. Change-Id: If8d679282f4a4fafd3c2ab343c37e4774054f1b0 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -553,7 +553,11 @@ void AxivionPluginPrivate::fetchIssueInfo(const QString &id)
|
||||
return;
|
||||
|
||||
const auto ruleHandler = [](const QByteArray &htmlText) {
|
||||
dd->m_axivionOutputPane.updateAndShowRule(QString::fromUtf8(htmlText));
|
||||
QByteArray fixedHtml = htmlText;
|
||||
const int idx = htmlText.indexOf("<div class=\"ax-issuedetails-table-container\">");
|
||||
if (idx >= 0)
|
||||
fixedHtml = "<html><body>" + htmlText.mid(idx);
|
||||
dd->m_axivionOutputPane.updateAndShowRule(QString::fromUtf8(fixedHtml));
|
||||
};
|
||||
|
||||
m_issueInfoRunner.start(issueHtmlRecipe(QString("SV") + id, ruleHandler));
|
||||
|
||||
Reference in New Issue
Block a user