diff --git a/share/qtcreator/templates/wizards/projects/vcs/git/wizard.json b/share/qtcreator/templates/wizards/projects/vcs/git/wizard.json index 401be45a758..62bad7ee123 100644 --- a/share/qtcreator/templates/wizards/projects/vcs/git/wizard.json +++ b/share/qtcreator/templates/wizards/projects/vcs/git/wizard.json @@ -41,7 +41,11 @@ "trDisplayName": "Repository:", "type": "LineEdit", "isComplete": "%{JS: Vcs.isValidRepoUrl('%{vcsId}', '%{Repo}')}", - "trIncompleteMessage": "Repository URL is not valid" + "trIncompleteMessage": "Repository URL is not valid", + "data": + { + "historyId": "Git.RemoteUrls" + } }, { "name": "Branch", diff --git a/src/plugins/git/remotedialog.cpp b/src/plugins/git/remotedialog.cpp index 912c1be4d9b..6d211e0c7ca 100644 --- a/src/plugins/git/remotedialog.cpp +++ b/src/plugins/git/remotedialog.cpp @@ -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;