forked from qt-creator/qt-creator
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 <david.schulz@qt.io>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user