forked from qt-creator/qt-creator
VCS: Allow use of base name for executable
Actual path is found on startup and when setting is changed Change-Id: If2cb0735953b9fb64df7425230c98efb384d9287 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
2e98952068
commit
7ffc4349f8
@@ -30,6 +30,8 @@
|
||||
|
||||
#include "vcsbaseclientsettings.h"
|
||||
|
||||
#include <utils/environment.h>
|
||||
|
||||
#include <QSettings>
|
||||
|
||||
namespace {
|
||||
@@ -165,13 +167,15 @@ public:
|
||||
QSharedData(other),
|
||||
m_valueHash(other.m_valueHash),
|
||||
m_defaultValueHash(other.m_defaultValueHash),
|
||||
m_settingsGroup(other.m_settingsGroup)
|
||||
m_settingsGroup(other.m_settingsGroup),
|
||||
m_binaryFullPath(other.m_binaryFullPath)
|
||||
{
|
||||
}
|
||||
|
||||
QHash<QString, SettingValue> m_valueHash;
|
||||
QVariantHash m_defaultValueHash;
|
||||
QString m_settingsGroup;
|
||||
QString m_binaryFullPath;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
@@ -326,8 +330,11 @@ QVariant VcsBaseClientSettings::value(const QString &key) const
|
||||
|
||||
void VcsBaseClientSettings::setValue(const QString &key, const QVariant &v)
|
||||
{
|
||||
if (SettingValue::isUsableVariantType(valueType(key)))
|
||||
if (SettingValue::isUsableVariantType(valueType(key))) {
|
||||
d->m_valueHash.insert(key, SettingValue(v));
|
||||
if (key == binaryPathKey)
|
||||
d->m_binaryFullPath = Utils::Environment::systemEnvironment().searchInPath(v.toString());
|
||||
}
|
||||
}
|
||||
|
||||
QVariant::Type VcsBaseClientSettings::valueType(const QString &key) const
|
||||
@@ -337,6 +344,11 @@ QVariant::Type VcsBaseClientSettings::valueType(const QString &key) const
|
||||
return QVariant::Invalid;
|
||||
}
|
||||
|
||||
QString VcsBaseClientSettings::binaryPath() const
|
||||
{
|
||||
return d->m_binaryFullPath;
|
||||
}
|
||||
|
||||
QString VcsBaseClientSettings::settingsGroup() const
|
||||
{
|
||||
return d->m_settingsGroup;
|
||||
|
||||
Reference in New Issue
Block a user