115 Private slot to handle changes of the URL. |
115 Private slot to handle changes of the URL. |
116 |
116 |
117 @param txt current text of the combo box |
117 @param txt current text of the combo box |
118 @type str |
118 @type str |
119 """ |
119 """ |
120 url = QUrl.fromUserInput(txt) |
120 enable = False |
121 enable = url.isValid() and url.scheme() in ConfigGitSchemes |
121 |
|
122 if txt: |
|
123 url = QUrl.fromUserInput(txt) |
|
124 if url.isValid(): |
|
125 if url.scheme() in ConfigGitSchemes: |
|
126 enable = True |
|
127 elif ':' in txt: |
|
128 # assume scp like repository URL |
|
129 enable = True |
|
130 |
122 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) |
131 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) |
123 |
132 |
124 self.vcsUrlButton.setEnabled(url.scheme() == "file" or len(txt) == 0) |
133 self.vcsUrlButton.setEnabled(url.scheme() == "file" or len(txt) == 0) |
125 |
134 |
126 @pyqtSlot() |
135 @pyqtSlot() |