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
This commit is contained in:
Eike Ziller
2012-09-27 20:38:57 +02:00
156 changed files with 705 additions and 421 deletions

View File

@@ -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;
}