37 self.forceCheckBox.setChecked(force) |
37 self.forceCheckBox.setChecked(force) |
38 |
38 |
39 self.okButton = self.buttonBox.button(QDialogButtonBox.Ok) |
39 self.okButton = self.buttonBox.button(QDialogButtonBox.Ok) |
40 self.okButton.setEnabled(False) |
40 self.okButton.setEnabled(False) |
41 |
41 |
42 self.rx_url = QRegExp('(?:file:|svn:|svn+ssh:|http:|https:)//.+') |
42 self.rx_url = re.compile('(?:file:|svn:|svn+ssh:|http:|https:)//.+') |
43 self.rx_rev = QRegExp('\\d+') |
43 self.rx_rev = re.compile('\\d+') |
44 |
44 |
45 self.tag1Combo.clear() |
45 self.tag1Combo.clear() |
46 self.tag1Combo.addItems(mergelist1) |
46 self.tag1Combo.addItems(mergelist1) |
47 self.tag2Combo.clear() |
47 self.tag2Combo.clear() |
48 self.tag2Combo.addItems(mergelist2) |
48 self.tag2Combo.addItems(mergelist2) |
57 Private method used to enable/disable the OK-button. |
57 Private method used to enable/disable the OK-button. |
58 """ |
58 """ |
59 self.okButton.setDisabled( |
59 self.okButton.setDisabled( |
60 self.tag1Combo.currentText() == "" or |
60 self.tag1Combo.currentText() == "" or |
61 self.tag2Combo.currentText() == "" or |
61 self.tag2Combo.currentText() == "" or |
62 not ((self.rx_url.exactMatch(self.tag1Combo.currentText()) and |
62 not ( |
63 self.rx_url.exactMatch(self.tag2Combo.currentText())) or |
63 (bool(self.rx_url.fullmatch(self.tag1Combo.currentText())) and |
64 (self.rx_rev.exactMatch(self.tag1Combo.currentText()) and |
64 bool(self.rx_url.fullmatch(self.tag2Combo.currentText()))) or |
65 self.rx_rev.exactMatch(self.tag2Combo.currentText())) |
65 (bool(self.rx_rev.fullmatch(self.tag1Combo.currentText())) and |
66 ) |
66 bool(self.rx_rev.fullmatch(self.tag2Combo.currentText()))) |
|
67 ) |
67 ) |
68 ) |
68 |
69 |
69 def on_tag1Combo_editTextChanged(self, text): |
70 def on_tag1Combo_editTextChanged(self, text): |
70 """ |
71 """ |
71 Private slot to handle the tag1Combo editTextChanged signal. |
72 Private slot to handle the tag1Combo editTextChanged signal. |