forked from qt-creator/qt-creator
		
	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>
This commit is contained in:
		@@ -39,6 +39,7 @@
 | 
			
		||||
#include <projectexplorer/buildsteplist.h>
 | 
			
		||||
#include <projectexplorer/kit.h>
 | 
			
		||||
#include <projectexplorer/projectexplorerconstants.h>
 | 
			
		||||
#include <projectexplorer/buildmanager.h>
 | 
			
		||||
#include <projectexplorer/target.h>
 | 
			
		||||
#include <utils/qtcassert.h>
 | 
			
		||||
 | 
			
		||||
@@ -211,9 +212,10 @@ void QbsCleanStep::handleProgress(int value)
 | 
			
		||||
 | 
			
		||||
void QbsCleanStep::createTaskAndOutput(ProjectExplorer::Task::TaskType type, const QString &message, const QString &file, int line)
 | 
			
		||||
{
 | 
			
		||||
    emit addTask(ProjectExplorer::Task(type, message,
 | 
			
		||||
                                       Utils::FileName::fromString(file), line,
 | 
			
		||||
                                       ProjectExplorer::Constants::TASK_CATEGORY_COMPILE));
 | 
			
		||||
    ProjectExplorer::Task task = ProjectExplorer::Task(type, message,
 | 
			
		||||
                                                       Utils::FileName::fromString(file), line,
 | 
			
		||||
                                                       ProjectExplorer::Constants::TASK_CATEGORY_COMPILE);
 | 
			
		||||
    emit addTask(task, 1);
 | 
			
		||||
    emit addOutput(message, NormalOutput);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user