forked from qt-creator/qt-creator
Git: Add customizable repository browser command.
Change-Id: Iac297e3665b18d97ca80097c4dd33dd70e64b9a1 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
2ba3f6c929
commit
4d1bbebf2a
@@ -36,6 +36,7 @@
|
||||
#include "gitclient.h"
|
||||
|
||||
#include <vcsbase/vcsbaseconstants.h>
|
||||
#include <utils/pathchooser.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
@@ -65,6 +66,8 @@ SettingsPageWidget::SettingsPageWidget(QWidget *parent) :
|
||||
#else
|
||||
m_ui.winHomeCheckBox->setVisible(false);
|
||||
#endif
|
||||
m_ui.repBrowserCommandPathChooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
|
||||
m_ui.repBrowserCommandPathChooser->setPromptDialogTitle(tr("Git Repository Browser Command"));
|
||||
}
|
||||
|
||||
GitSettings SettingsPageWidget::settings() const
|
||||
@@ -77,6 +80,7 @@ GitSettings SettingsPageWidget::settings() const
|
||||
rc.setValue(GitSettings::promptOnSubmitKey, m_ui.promptToSubmitCheckBox->isChecked());
|
||||
rc.setValue(GitSettings::winSetHomeEnvironmentKey, m_ui.winHomeCheckBox->isChecked());
|
||||
rc.setValue(GitSettings::gitkOptionsKey, m_ui.gitkOptionsLineEdit->text().trimmed());
|
||||
rc.setValue(GitSettings::repositoryBrowserCmd, m_ui.repBrowserCommandPathChooser->path().trimmed());
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -89,6 +93,7 @@ void SettingsPageWidget::setSettings(const GitSettings &s)
|
||||
m_ui.promptToSubmitCheckBox->setChecked(s.boolValue(GitSettings::promptOnSubmitKey));
|
||||
m_ui.winHomeCheckBox->setChecked(s.boolValue(GitSettings::winSetHomeEnvironmentKey));
|
||||
m_ui.gitkOptionsLineEdit->setText(s.stringValue(GitSettings::gitkOptionsKey));
|
||||
m_ui.repBrowserCommandPathChooser->setPath(s.stringValue(GitSettings::repositoryBrowserCmd));
|
||||
}
|
||||
|
||||
QString SettingsPageWidget::searchKeywords() const
|
||||
@@ -105,6 +110,8 @@ QString SettingsPageWidget::searchKeywords() const
|
||||
<< sep << m_ui.promptToSubmitCheckBox->text()
|
||||
<< sep << m_ui.gitkGroupBox->title()
|
||||
<< sep << m_ui.gitkOptionsLabel->text()
|
||||
<< sep << m_ui.repBrowserGroupBox->title()
|
||||
<< sep << m_ui.repBrowserCommandLabel->text()
|
||||
;
|
||||
rc.remove(QLatin1Char('&'));
|
||||
return rc;
|
||||
|
||||
Reference in New Issue
Block a user