--- a/Plugins/VcsPlugins/vcsGit/GitSubmoduleAddDialog.py Wed Feb 06 19:21:41 2019 +0100 +++ b/Plugins/VcsPlugins/vcsGit/GitSubmoduleAddDialog.py Fri Feb 08 17:38:00 2019 +0100 @@ -78,20 +78,22 @@ @type str """ enable = False + vcsUrlEnable = False if txt: url = QUrl.fromUserInput(txt) if url.isValid(): if url.scheme() in ConfigGitSchemes: enable = True + vcsUrlEnable = url.scheme() == "file" elif ':' in txt: # assume scp like repository URL enable = True + else: + vcsUrlEnable = True self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) - - self.submoduleUrlButton.setEnabled(url.scheme() == "file" or - len(txt) == 0) + self.submoduleUrlButton.setEnabled(vcsUrlEnable) @pyqtSlot() def on_submoduleUrlButton_clicked(self): @@ -145,19 +147,12 @@ """ self.__saveHistory() - url = QUrl.fromUserInput( - self.submoduleUrlCombo.currentText().replace("\\", "/")) path = self.submoduleDirEdit.text() if path: path = self.__getRelativePath(path) - try: - formattingOptions = QUrl.FormattingOptions(QUrl.None_) - except AttributeError: - # for PyQt < 5.6.0 - formattingOptions = QUrl.FormattingOptions(0) return ( - url.toString(formattingOptions), + self.submoduleUrlCombo.currentText().replace("\\", "/"), self.branchEdit.text(), self.nameEdit.text(), path,