Plugins/VcsPlugins/vcsGit/GitNewProjectOptionsDialog.py

changeset 6703
31b0306f0ecc
parent 6645
ad476851d7e0
child 6707
30f0ac20df50
--- a/Plugins/VcsPlugins/vcsGit/GitNewProjectOptionsDialog.py	Wed Feb 06 19:14:50 2019 +0100
+++ b/Plugins/VcsPlugins/vcsGit/GitNewProjectOptionsDialog.py	Wed Feb 06 19:21:41 2019 +0100
@@ -117,8 +117,17 @@
         @param txt current text of the combo box
         @type str
         """
-        url = QUrl.fromUserInput(txt)
-        enable = url.isValid() and url.scheme() in ConfigGitSchemes
+        enable = False
+        
+        if txt:
+            url = QUrl.fromUserInput(txt)
+            if url.isValid():
+                if url.scheme() in ConfigGitSchemes:
+                    enable = True
+            elif ':' in txt:
+                # assume scp like repository URL
+                enable = True
+        
         self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable)
         
         self.vcsUrlButton.setEnabled(url.scheme() == "file" or len(txt) == 0)

eric ide

mercurial