From b30b2f481c5671f2d89a91b0869c09060260b28d Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 28 Oct 2020 13:54:10 +0100 Subject: [PATCH] ClangTools: Make "go to next/previous diagnostic" open an editor It's very likely that the user will want to have the respective location displayed in the editor. Fixes: QTCREATORBUG-20658 Change-Id: I34128c6444208571df566725e2ad1675d4456853 Reviewed-by: David Schulz --- src/plugins/clangtools/clangtoolsdiagnosticview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/clangtools/clangtoolsdiagnosticview.cpp b/src/plugins/clangtools/clangtoolsdiagnosticview.cpp index ca421e5c825..689886d3f26 100644 --- a/src/plugins/clangtools/clangtoolsdiagnosticview.cpp +++ b/src/plugins/clangtools/clangtoolsdiagnosticview.cpp @@ -232,12 +232,14 @@ void DiagnosticView::goNext() { const QModelIndex currentIndex = selectionModel()->currentIndex(); selectIndex(getIndex(currentIndex, Next)); + openEditorForCurrentIndex(); } void DiagnosticView::goBack() { const QModelIndex currentIndex = selectionModel()->currentIndex(); selectIndex(getIndex(currentIndex, Previous)); + openEditorForCurrentIndex(); } QModelIndex DiagnosticView::getIndex(const QModelIndex &index, Direction direction) const