diff options
author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-03-23 12:23:22 +0100 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-03-24 10:52:12 +0000 |
commit | 1074d974324c9461d6b019ac387681019d6915dd (patch) | |
tree | b61f0f391bf5490e1c3e492501f53c3794f0ee0e | |
parent | dca76c9889d8bba49273ba9925cd5d2e9b32d9de (diff) | |
download | qt-creator-1074d974324c9461d6b019ac387681019d6915dd.tar.gz |
Clang: Avoid fragmentation in diagnostic display
A "diagnostic row" is displayed in two columns with the help of table,
one cell being the location, the other cell the diagnostic text. At
times, the location is wrapped too, which makes the whole diagnostic
display look fragmented/broken.
It looks like there is no way to avoid the wrapping of the location
column because Qt's CSS does not support the needed
style='white-space:nowrap'
Avoid the columns for a consistent display at all times.
Change-Id: I35e4a1c831f18e2bce6a4c9ed891fcae439d1a1b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r-- | src/plugins/clangcodemodel/clangdiagnostictooltipwidget.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/plugins/clangcodemodel/clangdiagnostictooltipwidget.cpp b/src/plugins/clangcodemodel/clangdiagnostictooltipwidget.cpp index f3004a55b5..42c77883bf 100644 --- a/src/plugins/clangcodemodel/clangdiagnostictooltipwidget.cpp +++ b/src/plugins/clangcodemodel/clangdiagnostictooltipwidget.cpp @@ -185,15 +185,7 @@ private: const bool hasFixit = m_displayHints.enableClickableFixits && !diagnostic.fixIts().isEmpty(); const QString diagnosticText = diagnostic.text().toString().toHtmlEscaped(); - - // For debugging, add to <table>: style='border-width:1px;border-color:red' - const QString text = QString::fromLatin1( - "<table cellspacing='0' cellpadding='0'>" - " <tr>" - " <td>%1: </td>" - " <td width='100%'>%2</td>" - " </tr>" - "</table>") + const QString text = QString::fromLatin1("%1: %2") .arg(clickableLocation(diagnostic, m_mainFilePath), clickableFixIt(diagnostic, diagnosticText, hasFixit)); |