Plugins/VcsPlugins/vcsGit/GitSubmoduleAddDialog.py

changeset 6703
31b0306f0ecc
parent 6645
ad476851d7e0
child 6707
30f0ac20df50
--- a/Plugins/VcsPlugins/vcsGit/GitSubmoduleAddDialog.py	Wed Feb 06 19:14:50 2019 +0100
+++ b/Plugins/VcsPlugins/vcsGit/GitSubmoduleAddDialog.py	Wed Feb 06 19:21:41 2019 +0100
@@ -77,8 +77,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.submoduleUrlButton.setEnabled(url.scheme() == "file" or

eric ide

mercurial