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 |