forked from qt-creator/qt-creator
Core: Streamline SearchResultWindow interface
That is, make SearchResultItem the one data type for adding search results. This will allow us to add additional properties to search results without adding more and more parameters to a bunch of functions. Change-Id: Ic2740477ae47449cee75caa2525727fe2b460f91 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -312,13 +312,13 @@ IEditor *GitGrep::openEditor(const SearchResultItem &item,
|
||||
const TextEditor::FileFindParameters ¶meters)
|
||||
{
|
||||
GitGrepParameters params = parameters.searchEngineParameters.value<GitGrepParameters>();
|
||||
if (params.ref.isEmpty() || item.path.isEmpty())
|
||||
if (params.ref.isEmpty() || item.path().isEmpty())
|
||||
return nullptr;
|
||||
const QString path = QDir::fromNativeSeparators(item.path.first());
|
||||
const QString path = QDir::fromNativeSeparators(item.path().first());
|
||||
const QString topLevel = parameters.additionalParameters.toString();
|
||||
IEditor *editor = m_client->openShowEditor(
|
||||
topLevel, params.ref, path, GitClient::ShowEditor::OnlyIfDifferent);
|
||||
editor->gotoLine(item.mainRange.begin.line, item.mainRange.begin.column);
|
||||
editor->gotoLine(item.mainRange().begin.line, item.mainRange().begin.column);
|
||||
return editor;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user