ClangTools: Avoid horizontal scrolling in the diagnostics view

Also, show the diagnostic text in the tooltip because the text might be
elided in the view now.

Change-Id: I7f38acacf72d68d7e4b696a01c7a0d1a76b4ed98
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Nikolai Kosjar
2018-05-22 15:35:12 +02:00
parent 595f6980b7
commit 72aac9573d
3 changed files with 15 additions and 0 deletions

View File

@@ -97,6 +97,12 @@ static QString createDiagnosticToolTipString(const Diagnostic &diagnostic)
diagnostic.type.toHtmlEscaped());
}
if (!diagnostic.description.isEmpty()) {
lines << qMakePair(
QCoreApplication::translate("ClangTools::Diagnostic", "Description:"),
diagnostic.description.toHtmlEscaped());
}
if (!diagnostic.issueContext.isEmpty() && !diagnostic.issueContextKind.isEmpty()) {
lines << qMakePair(
QCoreApplication::translate("ClangTools::Diagnostic", "Context:"),