36 |
36 |
37 for patch in patchesList: |
37 for patch in patchesList: |
38 name, summary = patch.split("@@") |
38 name, summary = patch.split("@@") |
39 QTreeWidgetItem(self.sourcePatches, [name, summary]) |
39 QTreeWidgetItem(self.sourcePatches, [name, summary]) |
40 |
40 |
41 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
41 self.buttonBox.button( |
|
42 QDialogButtonBox.StandardButton.Ok).setEnabled(False) |
42 |
43 |
43 def __updateOkButton(self): |
44 def __updateOkButton(self): |
44 """ |
45 """ |
45 Private slot to update the status of the OK button. |
46 Private slot to update the status of the OK button. |
46 """ |
47 """ |
47 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled( |
48 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( |
48 self.selectedPatches.topLevelItemCount() != 0) |
49 self.selectedPatches.topLevelItemCount() != 0) |
49 |
50 |
50 @pyqtSlot() |
51 @pyqtSlot() |
51 def on_addButton_clicked(self): |
52 def on_addButton_clicked(self): |
52 """ |
53 """ |
72 """ |
73 """ |
73 row = self.selectedPatches.indexOfTopLevelItem( |
74 row = self.selectedPatches.indexOfTopLevelItem( |
74 self.selectedPatches.currentItem()) |
75 self.selectedPatches.currentItem()) |
75 itm = self.selectedPatches.takeTopLevelItem(row) |
76 itm = self.selectedPatches.takeTopLevelItem(row) |
76 self.sourcePatches.addTopLevelItem(itm) |
77 self.sourcePatches.addTopLevelItem(itm) |
77 self.sourcePatches.sortItems(0, Qt.AscendingOrder) |
78 self.sourcePatches.sortItems(0, Qt.SortOrder.AscendingOrder) |
78 |
79 |
79 self.__updateOkButton() |
80 self.__updateOkButton() |
80 |
81 |
81 @pyqtSlot() |
82 @pyqtSlot() |
82 def on_upButton_clicked(self): |
83 def on_upButton_clicked(self): |