forked from qt-creator/qt-creator
Core: Show context of filter matches
When inspecting logs often enough the relevant information is next to the line with the unique expression that's easy to match. The `grep` tool solves this problem by providing various `--*context` options which configure how much context to show for each match. This change tries to replicate this feature. Task-number: QTCREATORBUG-30167 Change-Id: I6432870c0b958df8c5dc616009aea4ca54973245 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -203,6 +203,11 @@ bool CompileOutputWindow::canNavigate() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CompileOutputWindow::hasFilterContext() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void CompileOutputWindow::registerPositionOf(const Task &task, int linkedOutputLines, int skipLines,
|
||||
int offset)
|
||||
{
|
||||
@@ -227,7 +232,8 @@ Utils::OutputFormatter *CompileOutputWindow::outputFormatter() const
|
||||
void CompileOutputWindow::updateFilter()
|
||||
{
|
||||
m_outputWindow->updateFilterProperties(filterText(), filterCaseSensitivity(),
|
||||
filterUsesRegexp(), filterIsInverted());
|
||||
filterUsesRegexp(), filterIsInverted(),
|
||||
beforeContext(), afterContext());
|
||||
}
|
||||
|
||||
// CompileOutputSettings
|
||||
|
||||
Reference in New Issue
Block a user