forked from qt-creator/qt-creator
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:
@@ -65,7 +65,6 @@
|
||||
#include <vcsbase/vcsbaseplugin.h>
|
||||
|
||||
#include <QRegExp>
|
||||
#include <QTemporaryFile>
|
||||
#include <QTime>
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
|
||||
@@ -74,7 +74,6 @@
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
#include <QTemporaryFile>
|
||||
#include <QtPlugin>
|
||||
|
||||
#include <QAction>
|
||||
@@ -717,9 +716,7 @@ void GitPlugin::submitCurrentLog()
|
||||
{
|
||||
// Close the submit editor
|
||||
m_submitActionTriggered = true;
|
||||
QList<Core::IEditor*> editors;
|
||||
editors.push_back(Core::EditorManager::currentEditor());
|
||||
Core::ICore::editorManager()->closeEditors(editors);
|
||||
Core::ICore::editorManager()->closeEditor();
|
||||
}
|
||||
|
||||
bool GitPlugin::submitEditorAboutToClose(VcsBase::VcsBaseSubmitEditor *submitEditor)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ class GitSettings : public VcsBase::VcsBaseClientSettings
|
||||
public:
|
||||
GitSettings();
|
||||
|
||||
static const QLatin1String pathKey;
|
||||
static const QLatin1String pullRebaseKey;
|
||||
static const QLatin1String omitAnnotationDateKey;
|
||||
static const QLatin1String ignoreSpaceChangesInDiffKey;
|
||||
@@ -59,9 +58,6 @@ public:
|
||||
QString gitBinaryPath(bool *ok = 0, QString *errorMessage = 0) const;
|
||||
|
||||
GitSettings &operator = (const GitSettings &s);
|
||||
|
||||
private:
|
||||
mutable QString m_binaryPath;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user