diff options
author | Eike Ziller <eike.ziller@digia.com> | 2012-09-27 20:38:57 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2012-09-27 20:38:57 +0200 |
commit | 6faede0860db6fad0645dc36ea817df0b95b7cbc (patch) | |
tree | da52693f995479bf0b0f8cf25fd4cf4da3c0f857 /src/plugins/git/gitsettings.cpp | |
parent | a299252ae5938e33b797e4b6e5014465709584bf (diff) | |
parent | 14a2ff598aec6af17299580468e75a95055c8894 (diff) |
Merge remote-tracking branch 'origin/2.6'
Conflicts:
share/qtcreator/qml/qmlpuppet/commands/changenodesourcecommand.h
share/qtcreator/qml/qmlpuppet/commands/tokencommand.h
share/qtcreator/qml/qmlpuppet/container/reparentcontainer.h
share/qtcreator/qml/qmlpuppet/qml2puppet/instances/componentnodeinstance.h
share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/nodeinstanceclientproxy.cpp
src/plugins/git/gitsettings.cpp
tests/manual/ssh/remoteprocess/remoteprocesstest.h
Change-Id: I00c294e6d911d272615e65fed58562399af97a4e
Diffstat (limited to 'src/plugins/git/gitsettings.cpp')
-rw-r--r-- | src/plugins/git/gitsettings.cpp | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/src/plugins/git/gitsettings.cpp b/src/plugins/git/gitsettings.cpp index 5d61a3c9666..cab05b01efa 100644 --- a/src/plugins/git/gitsettings.cpp +++ b/src/plugins/git/gitsettings.cpp @@ -31,14 +31,11 @@ #include "gitsettings.h" #include <utils/hostosinfo.h> -#include <utils/synchronousprocess.h> - #include <QCoreApplication> namespace Git { namespace Internal { -const QLatin1String GitSettings::pathKey("Path"); const QLatin1String GitSettings::pullRebaseKey("PullRebase"); const QLatin1String GitSettings::omitAnnotationDateKey("OmitAnnotationDate"); const QLatin1String GitSettings::ignoreSpaceChangesInDiffKey("SpaceIgnorantDiff"); @@ -56,7 +53,6 @@ GitSettings::GitSettings() declareKey(binaryPathKey, QLatin1String("git")); declareKey(timeoutKey, Utils::HostOsInfo::isWindowsHost() ? 60 : 30); - declareKey(pathKey, QString()); declareKey(pullRebaseKey, false); declareKey(omitAnnotationDateKey, false); declareKey(ignoreSpaceChangesInDiffKey, true); @@ -78,33 +74,21 @@ QString GitSettings::gitBinaryPath(bool *ok, QString *errorMessage) const if (errorMessage) errorMessage->clear(); - if (m_binaryPath.isEmpty()) { - const QString binary = binaryPath(); - QString currentPath = stringValue(pathKey); - QString systemPath = QString::fromLocal8Bit(qgetenv("PATH")); - if (!systemPath.isEmpty()) { - if (!currentPath.isEmpty()) - currentPath.append(Utils::HostOsInfo::pathListSeparator()); - currentPath.append(systemPath); - } - // Search in path? - m_binaryPath = Utils::SynchronousProcess::locateBinary(currentPath, binary); - if (m_binaryPath.isEmpty()) { - if (ok) - *ok = false; - if (errorMessage) - *errorMessage = QCoreApplication::translate("Git::Internal::GitSettings", - "The binary '%1' could not be located in the path '%2'") - .arg(binary, currentPath); - } + QString binPath = binaryPath(); + if (binPath.isEmpty()) { + if (ok) + *ok = false; + if (errorMessage) + *errorMessage = QCoreApplication::translate("Git::Internal::GitSettings", + "The binary '%1' could not be located in the path '%2'") + .arg(stringValue(binaryPathKey), stringValue(pathKey)); } - return m_binaryPath; + return binPath; } GitSettings &GitSettings::operator = (const GitSettings &s) { VcsBaseClientSettings::operator =(s); - m_binaryPath.clear(); return *this; } |