VcsBase: Don't return editor from annotate()

Take int firstLine as last arg instead. Switch the order of
3rd and 4th args as most callers provide lineNumber
and don't provide revision.

Change-Id: Iab60c1068a4d9829d10219af39bf3dcbf51e37bb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2022-12-11 11:49:17 +01:00
parent db85862a8c
commit 32e824c762
11 changed files with 45 additions and 54 deletions

View File

@@ -1133,11 +1133,8 @@ void GitPluginPrivate::blameFile()
const FilePath fileName = FilePath::fromString(state.currentFile()).canonicalPath();
FilePath topLevel;
VcsManager::findVersionControlForDirectory(fileName.parentDir(), &topLevel);
VcsBaseEditorWidget *editor = m_gitClient.annotate(
topLevel, fileName.relativeChildPath(topLevel).toString(),
{}, lineNumber, extraOptions);
if (firstLine > 0)
editor->setFirstLineNumber(firstLine);
m_gitClient.annotate(topLevel, fileName.relativeChildPath(topLevel).toString(),
lineNumber, {}, extraOptions, firstLine);
}
void GitPluginPrivate::logProject()
@@ -2126,7 +2123,7 @@ FilePaths GitPluginPrivate::unmanagedFiles(const FilePaths &filePaths) const
void GitPluginPrivate::vcsAnnotate(const FilePath &filePath, int line)
{
m_gitClient.annotate(filePath.absolutePath(), filePath.fileName(), {}, line);
m_gitClient.annotate(filePath.absolutePath(), filePath.fileName(), line);
}
void GitPlugin::emitFilesChanged(const QStringList &l)