forked from qt-creator/qt-creator
ClangTools: Add documentation for current diagnostic to tooltip
Fixes: QTCREATORBUG-25163 Change-Id: I284c50c0b9b73c74ba328624c5238368de05839d Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -123,6 +123,12 @@ QString createDiagnosticToolTipString(
|
|||||||
lines << steps;
|
lines << steps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QString url = documentationUrl(diagnostic.name);
|
||||||
|
if (!url.isEmpty()) {
|
||||||
|
lines << qMakePair(QCoreApplication::translate("ClangTools::Diagnostic", "Documentation:"),
|
||||||
|
QString("<a href=\"%1\">%1</a>").arg(url));
|
||||||
|
}
|
||||||
|
|
||||||
QString html = QLatin1String("<html>"
|
QString html = QLatin1String("<html>"
|
||||||
"<head>"
|
"<head>"
|
||||||
"<style>dt { font-weight:bold; } dd { font-family: monospace; }</style>"
|
"<style>dt { font-weight:bold; } dd { font-family: monospace; }</style>"
|
||||||
|
Reference in New Issue
Block a user