Plugins/VcsPlugins/vcsGit/GitSubmoduleAddDialog.py

changeset 6703
31b0306f0ecc
parent 6645
ad476851d7e0
child 6707
30f0ac20df50
equal deleted inserted replaced
6702:793af5761910 6703:31b0306f0ecc
75 Private slot to handle changes of the submodule repository URL. 75 Private slot to handle changes of the submodule repository URL.
76 76
77 @param txt current text of the combo box 77 @param txt current text of the combo box
78 @type str 78 @type str
79 """ 79 """
80 url = QUrl.fromUserInput(txt) 80 enable = False
81 enable = url.isValid() and url.scheme() in ConfigGitSchemes 81
82 if txt:
83 url = QUrl.fromUserInput(txt)
84 if url.isValid():
85 if url.scheme() in ConfigGitSchemes:
86 enable = True
87 elif ':' in txt:
88 # assume scp like repository URL
89 enable = True
90
82 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) 91 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable)
83 92
84 self.submoduleUrlButton.setEnabled(url.scheme() == "file" or 93 self.submoduleUrlButton.setEnabled(url.scheme() == "file" or
85 len(txt) == 0) 94 len(txt) == 0)
86 95

eric ide

mercurial