aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/buildstep.h
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@theqtcompany.com>2015-04-20 17:13:45 +0200
committerDaniel Teske <daniel.teske@theqtcompany.com>2015-04-21 13:42:03 +0000
commit4f383f77b42fe6a0f7a2768b4c1103a68295ce3a (patch)
tree8fbdb53b3046be057b8c91b3dea65131997db048 /src/plugins/projectexplorer/buildstep.h
parent02068b8ef1d5dd615eb53478d01ff881cda73b74 (diff)
Tasks: Make the linking of compile output to Tasks more robust
Clicking on error messages is supposed to jump to the editor. And "Show Output" on the task is supposed to select the error in the output. The old code just registered the task for the last line of output. This broke for every parser that allowed for error messages that spanned multiple lines. And was obviously also incorrect for tasks that weren't generated due to compile output. Fix both of those issues by giving the IOutputParsers more control on which lines are linked to a task. Task-number: QTCREATORBUG-14136 Change-Id: I095922c9875620dabfb7d406f6b152c8a9b25b62 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com> Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Diffstat (limited to 'src/plugins/projectexplorer/buildstep.h')
-rw-r--r--src/plugins/projectexplorer/buildstep.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/buildstep.h b/src/plugins/projectexplorer/buildstep.h
index 867fc15f4d..bfd0dfd616 100644
--- a/src/plugins/projectexplorer/buildstep.h
+++ b/src/plugins/projectexplorer/buildstep.h
@@ -84,8 +84,13 @@ public:
enum OutputNewlineSetting { DoAppendNewline, DontAppendNewline };
signals:
- void addTask(const ProjectExplorer::Task &task);
+ /// Adds a \p task to the Issues pane.
+ /// Do note that for linking compile output with tasks, you should first emit the task
+ /// and then emit the output. \p linkedOutput lines will be linked. And the last \p skipLines will
+ /// be skipped.
+ void addTask(const ProjectExplorer::Task &task, int linkedOutputLines = 0, int skipLines = 0);
+ /// Adds \p string to the compile output view, formatted in \p format
void addOutput(const QString &string, ProjectExplorer::BuildStep::OutputFormat format,
ProjectExplorer::BuildStep::OutputNewlineSetting newlineSetting = DoAppendNewline) const;