VCSBase: Modernize

override, auto, nullptr, member initializers.

Change-Id: Ie21b8f4a4d6673947d82619bc3de677fcea63d7f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Orgad Shaneh
2018-09-20 01:32:36 +03:00
committed by Orgad Shaneh
parent e0520794f5
commit 8f65486dfc
19 changed files with 144 additions and 189 deletions

View File

@@ -106,7 +106,7 @@ bool VcsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
expander->registerVariable(Constants::VAR_VCS_NAME,
tr("Name of the version control system in use by the current project."),
[]() -> QString {
IVersionControl *vc = 0;
IVersionControl *vc = nullptr;
if (Project *project = ProjectTree::currentProject())
vc = VcsManager::findVersionControlForDirectory(project->projectDirectory().toString());
return vc ? vc->displayName() : QString();
@@ -115,7 +115,7 @@ bool VcsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
expander->registerVariable(Constants::VAR_VCS_TOPIC,
tr("The current version control topic (branch or tag) identification of the current project."),
[]() -> QString {
IVersionControl *vc = 0;
IVersionControl *vc = nullptr;
QString topLevel;
if (Project *project = ProjectTree::currentProject())
vc = VcsManager::findVersionControlForDirectory(project->projectDirectory().toString(), &topLevel);