Make the git plugin look for the binary in the path specified in the settings. Previously, the environment was passed to the process, but that did not affect the location of the binary.

This commit is contained in:
Friedemann Kleint
2009-02-19 17:47:44 +01:00
committed by unknown
parent 890220d5b4
commit 90b094e832
9 changed files with 173 additions and 13 deletions

View File

@@ -36,8 +36,10 @@
#include "gitplugin.h"
#include <QtCore/QDebug>
#include <QtGui/QMessageBox>
using namespace Git::Internal;
namespace Git {
namespace Internal {
SettingsPageWidget::SettingsPageWidget(QWidget *parent) :
QWidget(parent)
@@ -101,6 +103,17 @@ void SettingsPage::apply()
{
if (!m_widget)
return;
const GitSettings newSettings = m_widget->settings();
// Warn if git cannot be found in path if the widget is on top
if (m_widget->isVisible()) {
bool gitFoundOk;
QString errorMessage;
newSettings.gitBinaryPath(&gitFoundOk, &errorMessage);
if (!gitFoundOk)
QMessageBox::warning(m_widget, tr("Git Settings"), errorMessage);
}
GitPlugin::instance()->setSettings(m_widget->settings());
GitPlugin::instance()->setSettings(newSettings);
}
}
}