Git: Add remote URL history completer

To checkout wizard and to remote add dialog.

Change-Id: I8e4e011a41a862a40d6c1eadd0eaf3ce55f6db80
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Andre Hartmann
2020-04-04 11:11:42 +02:00
committed by André Hartmann
parent a59420a9c3
commit ca22b33ddc
2 changed files with 7 additions and 1 deletions

View File

@@ -53,6 +53,7 @@ public:
m_remoteNames(remoteNames)
{
m_ui.setupUi(this);
m_ui.nameEdit->setHistoryCompleter("Git.RemoteNames");
m_ui.nameEdit->setValidationFunction([this](Utils::FancyLineEdit *edit, QString *errorMessage) {
if (!edit)
return false;
@@ -84,6 +85,7 @@ public:
m_ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(m_ui.nameEdit->isValid());
});
m_ui.urlEdit->setHistoryCompleter("Git.RemoteUrls");
m_ui.urlEdit->setValidationFunction([](Utils::FancyLineEdit *edit, QString *errorMessage) {
if (!edit || edit->text().isEmpty())
return false;