Plugins/VcsPlugins/vcsGit/GitNewProjectOptionsDialog.py

changeset 6703
31b0306f0ecc
parent 6645
ad476851d7e0
child 6707
30f0ac20df50
equal deleted inserted replaced
6702:793af5761910 6703:31b0306f0ecc
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()

eric ide

mercurial