Commit 87058627 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Git: Use Qt Creator as an editor for Git



Qt Creator runs Git in a "dumb" terminal which does not
allow opening an editor. Use Qt Creator itself as an editor
when needed.

Change-Id: Ide073299964803d02479dade24ddee0283ebd83b
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent db29090b
......@@ -63,12 +63,13 @@
#include <vcsbase/vcsbaseoutputwindow.h>
#include <vcsbase/vcsbaseplugin.h>
#include <QRegExp>
#include <QTime>
#include <QFileInfo>
#include <QCoreApplication>
#include <QDir>
#include <QFileInfo>
#include <QHash>
#include <QRegExp>
#include <QSignalMapper>
#include <QTime>
#include <QComboBox>
#include <QMessageBox>
......@@ -401,6 +402,9 @@ GitClient::GitClient(GitSettings *settings) :
{
QTC_CHECK(settings);
connect(Core::ICore::instance(), SIGNAL(saveSettingsRequested()), this, SLOT(saveSettings()));
m_gitQtcEditor = QString::fromLatin1("\"%1\" -client -block -pid %2")
.arg(QCoreApplication::applicationFilePath())
.arg(QCoreApplication::applicationPid());
}
GitClient::~GitClient()
......@@ -1538,6 +1542,7 @@ QProcessEnvironment GitClient::processEnvironment() const
&& settings()->boolValue(GitSettings::winSetHomeEnvironmentKey)) {
environment.insert(QLatin1String("HOME"), QDir::toNativeSeparators(QDir::homePath()));
}
environment.insert(QLatin1String("GIT_EDITOR"), m_gitQtcEditor);
// Set up SSH and C locale (required by git using perl).
VcsBase::VcsBasePlugin::setProcessEnvironment(&environment, false);
return environment;
......
......@@ -341,6 +341,7 @@ private:
const QString m_msgWait;
QSignalMapper *m_repositoryChangedSignalMapper;
GitSettings *m_settings;
QString m_gitQtcEditor;
};
} // namespace Internal
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment