forked from qt-creator/qt-creator
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: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
db29090b05
commit
8705862786
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user