VcsBasePlugin: Use more FilePath

Change-Id: I7bc80245b093b210439efdf3ea353b52b288dcc0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2022-10-04 12:54:55 +02:00
parent 34f9229eef
commit c666c93882
8 changed files with 55 additions and 56 deletions

View File

@@ -95,10 +95,10 @@ bool VcsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
tr("The current version control topic (branch or tag) identification of the current project."),
[]() -> QString {
IVersionControl *vc = nullptr;
QString topLevel;
FilePath topLevel;
if (Project *project = ProjectTree::currentProject())
vc = VcsManager::findVersionControlForDirectory(project->projectDirectory(), &topLevel);
return vc ? vc->vcsTopic(FilePath::fromString(topLevel)) : QString();
return vc ? vc->vcsTopic(topLevel) : QString();
});
expander->registerVariable(Constants::VAR_VCS_TOPLEVELPATH,