Vcs: Replace findRepositoryForDirectory

By some function findRepositoryForFile operating on any file and
using FilePath.

Change-Id: I91b8aa38b1c6b33993b9b790fbc2ff4d378ad8a8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
hjk
2021-07-29 17:54:14 +02:00
parent edcedabed9
commit 56520c770c
9 changed files with 19 additions and 23 deletions

View File

@@ -754,10 +754,9 @@ bool MercurialPluginPrivate::isVcsFileOrDirectory(const FilePath &filePath) cons
bool MercurialPluginPrivate::managesDirectory(const FilePath &filePath, FilePath *topLevel) const
{
QFileInfo dir = filePath.toFileInfo();
const QString topLevelFound = m_client.findTopLevelForFile(dir);
const FilePath topLevelFound = m_client.findTopLevelForFile(filePath);
if (topLevel)
*topLevel = FilePath::fromString(topLevelFound);
*topLevel = topLevelFound;
return !topLevelFound.isEmpty();
}