aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/linuxiccparser.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-05-12 16:26:34 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2020-05-14 08:23:59 +0000
commitb02f6b5d30a81040ad5f4912d689926ddc4da95a (patch)
treeafc214dcbbaa8331c096e0f04489e28ced5898ab /src/plugins/projectexplorer/linuxiccparser.cpp
parente35f945758e46051a85c7d33a91eedcf31f5d98a (diff)
ProjectExplorer: Give the Task class an explicit summary
We'd like to create more useful tasks from compiler output, that is, try harder to identify consecutive lines that refer to the same issue and create one task for them, rather than one for each line. In such "aggregate" tasks, the first line will not necessarily carry the main information. Therefore, we make it explicit what this main information is by introducing a dedicated summary member. Also streamline the font handling for compile tasks. Change-Id: I933f2643a13c710dab1ab548c56669b129026eb5 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/linuxiccparser.cpp')
-rw-r--r--src/plugins/projectexplorer/linuxiccparser.cpp21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/plugins/projectexplorer/linuxiccparser.cpp b/src/plugins/projectexplorer/linuxiccparser.cpp
index 49bdbcdc2a..99427de113 100644
--- a/src/plugins/projectexplorer/linuxiccparser.cpp
+++ b/src/plugins/projectexplorer/linuxiccparser.cpp
@@ -92,18 +92,7 @@ OutputLineParser::Result LinuxIccParser::handleLine(const QString &line, OutputF
return Status::InProgress;
}
if (!m_expectFirstLine && m_caretLine.indexIn(line) != -1) {
- // Format the last line as code
- QTextLayout::FormatRange fr;
- fr.start = m_temporary.description.lastIndexOf(QLatin1Char('\n')) + 1;
- fr.length = m_temporary.description.length() - fr.start;
- fr.format.setFontItalic(true);
- m_temporary.formats.append(fr);
-
- QTextLayout::FormatRange fr2;
- fr2.start = fr.start + line.indexOf(QLatin1Char('^')) - m_indent;
- fr2.length = 1;
- fr2.format.setFontWeight(QFont::Bold);
- m_temporary.formats.append(fr2);
+ // FIXME: m_temporary.details.append(line);
return Status::InProgress;
}
if (!m_expectFirstLine && line.trimmed().isEmpty()) { // last Line
@@ -113,11 +102,7 @@ OutputLineParser::Result LinuxIccParser::handleLine(const QString &line, OutputF
return Status::Done;
}
if (!m_expectFirstLine && m_continuationLines.indexIn(line) != -1) {
- m_temporary.description.append(QLatin1Char('\n'));
- m_indent = 0;
- while (m_indent < line.length() && line.at(m_indent).isSpace())
- m_indent++;
- m_temporary.description.append(m_continuationLines.cap(1).trimmed());
+ m_temporary.details.append(m_continuationLines.cap(1).trimmed());
++m_lines;
return Status::InProgress;
}
@@ -139,6 +124,8 @@ void LinuxIccParser::flush()
{
if (m_temporary.isNull())
return;
+
+ setMonospacedDetailsFormat(m_temporary);
Task t = m_temporary;
m_temporary.clear();
scheduleTask(t, m_lines, 1);