Commit c6a9de72 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Git: Save settings

VCSBaseClient handles saving of settings for us, but we do not
use that yet, so we have to do that ourselves:-(

Change-Id: I731d01d429497581fad814effd68bbd784e05fe8
Reviewed-on: http://codereview.qt-project.org/6080

Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent ddf01f35
......@@ -309,6 +309,7 @@ GitClient::GitClient(GitSettings *settings) :
m_settings(settings)
{
Q_ASSERT(settings);
connect(m_core, SIGNAL(saveSettingsRequested()), this, SLOT(saveSettings()));
}
GitClient::~GitClient()
......@@ -603,6 +604,11 @@ void GitClient::show(const QString &source, const QString &id, const QStringList
executeGit(workDir, arguments, editor);
}
void GitClient::saveSettings()
{
settings()->writeSettings(m_core->settings());
}
void GitClient::slotBlameRevisionRequested(const QString &source, QString change, int lineNumber)
{
// This might be invoked with a verbose revision description
......
......@@ -229,6 +229,7 @@ public:
public slots:
void show(const QString &source, const QString &id, const QStringList &args = QStringList());
void saveSettings();
private slots:
void slotBlameRevisionRequested(const QString &source, QString change, int lineNumber);
......
......@@ -1070,6 +1070,7 @@ void GitPlugin::setSettings(const GitSettings &s)
return;
m_settings = s;
m_gitClient->saveSettings();
static_cast<GitVersionControl *>(versionControl())->emitConfigurationChanged();
}
......
Supports Markdown
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