46 |
46 |
47 self.__vcs = vcs |
47 self.__vcs = vcs |
48 self.__repodir = None |
48 self.__repodir = None |
49 |
49 |
50 self.refreshButton = self.buttonBox.addButton( |
50 self.refreshButton = self.buttonBox.addButton( |
51 self.tr("Refresh"), QDialogButtonBox.ActionRole) |
51 self.tr("Refresh"), QDialogButtonBox.ButtonRole.ActionRole) |
52 self.refreshButton.setToolTip( |
52 self.refreshButton.setToolTip( |
53 self.tr("Press to refresh the status display")) |
53 self.tr("Press to refresh the status display")) |
54 |
54 |
55 def start(self, projectDir): |
55 def start(self, projectDir): |
56 """ |
56 """ |
137 lineParts[0], # commit ID |
137 lineParts[0], # commit ID |
138 lineParts[2], # additional info |
138 lineParts[2], # additional info |
139 ]) |
139 ]) |
140 |
140 |
141 self.statusList.header().resizeSections( |
141 self.statusList.header().resizeSections( |
142 QHeaderView.ResizeToContents) |
142 QHeaderView.ResizeMode.ResizeToContents) |
143 |
143 |
144 self.statusList.setSortingEnabled(True) |
144 self.statusList.setSortingEnabled(True) |
145 self.statusList.sortItems(0, Qt.AscendingOrder) |
145 self.statusList.sortItems(0, Qt.SortOrder.AscendingOrder) |
146 self.statusList.setSortingEnabled(False) |
146 self.statusList.setSortingEnabled(False) |
147 |
147 |
148 @pyqtSlot(QAbstractButton) |
148 @pyqtSlot(QAbstractButton) |
149 def on_buttonBox_clicked(self, button): |
149 def on_buttonBox_clicked(self, button): |
150 """ |
150 """ |
151 Private slot called by a button of the button box clicked. |
151 Private slot called by a button of the button box clicked. |
152 |
152 |
153 @param button button that was clicked (QAbstractButton) |
153 @param button button that was clicked (QAbstractButton) |
154 """ |
154 """ |
155 if button == self.buttonBox.button(QDialogButtonBox.Close): |
155 if button == self.buttonBox.button( |
|
156 QDialogButtonBox.StandardButton.Close |
|
157 ): |
156 self.close() |
158 self.close() |
157 elif button == self.refreshButton: |
159 elif button == self.refreshButton: |
158 self.on_refreshButton_clicked() |
160 self.on_refreshButton_clicked() |
159 |
161 |
160 @pyqtSlot() |
162 @pyqtSlot() |