Use pointer to member or member function with transform

... when possible.  More compact.

Change-Id: I81410b7e6d523b9405c87f70a474ded1fa9ce960
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2019-08-14 12:32:11 +02:00
parent d2a0b13252
commit 835ff7e692
2 changed files with 2 additions and 5 deletions

View File

@@ -354,8 +354,7 @@ QVariant::Type VcsBaseClientSettings::valueType(const QString &key) const
FilePath VcsBaseClientSettings::binaryPath() const
{
if (d->m_binaryFullPath.isEmpty()) {
const FilePathList searchPaths
= Utils::transform(searchPathList(), [](const QString &s) { return FilePath::fromString(s); });
const FilePathList searchPaths = Utils::transform(searchPathList(), &FilePath::fromString);
d->m_binaryFullPath = Environment::systemEnvironment().searchInPath(
stringValue(binaryPathKey), searchPaths);
}