VCS: Use namespace Utils

Change-Id: I41c818362398fd194995baf5b1adb16899e83217
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2018-07-17 22:54:58 +03:00
committed by Orgad Shaneh
parent dc29aafb52
commit afb60d0434
10 changed files with 92 additions and 76 deletions

View File

@@ -34,6 +34,8 @@
#include <QSettings>
#include <QVariant>
using namespace Utils;
namespace {
class SettingValue
@@ -176,7 +178,7 @@ public:
QHash<QString, SettingValue> m_valueHash;
QVariantHash m_defaultValueHash;
QString m_settingsGroup;
mutable Utils::FileName m_binaryFullPath;
mutable FileName m_binaryFullPath;
};
} // namespace Internal
@@ -352,12 +354,12 @@ QVariant::Type VcsBaseClientSettings::valueType(const QString &key) const
return QVariant::Invalid;
}
Utils::FileName VcsBaseClientSettings::binaryPath() const
FileName VcsBaseClientSettings::binaryPath() const
{
if (d->m_binaryFullPath.isEmpty()) {
const Utils::FileNameList searchPaths
= Utils::transform(searchPathList(), [](const QString &s) { return Utils::FileName::fromString(s); });
d->m_binaryFullPath = Utils::Environment::systemEnvironment().searchInPath(
const FileNameList searchPaths
= Utils::transform(searchPathList(), [](const QString &s) { return FileName::fromString(s); });
d->m_binaryFullPath = Environment::systemEnvironment().searchInPath(
stringValue(binaryPathKey), searchPaths);
}
return d->m_binaryFullPath;
@@ -365,7 +367,7 @@ Utils::FileName VcsBaseClientSettings::binaryPath() const
QStringList VcsBaseClientSettings::searchPathList() const
{
return stringValue(pathKey).split(Utils::HostOsInfo::pathListSeparator(), QString::SkipEmptyParts);
return stringValue(pathKey).split(HostOsInfo::pathListSeparator(), QString::SkipEmptyParts);
}
QString VcsBaseClientSettings::settingsGroup() const