--- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnPropListDialog.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnPropListDialog.py Tue Mar 02 17:17:09 2021 +0100 @@ -38,12 +38,14 @@ self.setupUi(self) self.refreshButton = self.buttonBox.addButton( - self.tr("Refresh"), QDialogButtonBox.ActionRole) + self.tr("Refresh"), QDialogButtonBox.ButtonRole.ActionRole) self.refreshButton.setToolTip( self.tr("Press to refresh the properties display")) self.refreshButton.setEnabled(False) - self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) - self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Close).setEnabled(False) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Cancel).setDefault(True) self.process = QProcess() env = QProcessEnvironment.systemEnvironment() @@ -52,7 +54,8 @@ self.vcs = vcs self.propsList.headerItem().setText(self.propsList.columnCount(), "") - self.propsList.header().setSortIndicator(0, Qt.AscendingOrder) + self.propsList.header().setSortIndicator( + 0, Qt.SortOrder.AscendingOrder) self.process.finished.connect(self.__procFinished) self.process.readyReadStandardOutput.connect(self.__readStdout) @@ -73,7 +76,8 @@ """ Private method to resize the list columns. """ - self.propsList.header().resizeSections(QHeaderView.ResizeToContents) + self.propsList.header().resizeSections( + QHeaderView.ResizeMode.ResizeToContents) self.propsList.header().setStretchLastSection(True) def __generateItem(self, path, propName, propValue): @@ -94,7 +98,7 @@ """ if ( self.process is not None and - self.process.state() != QProcess.NotRunning + self.process.state() != QProcess.ProcessState.NotRunning ): self.process.terminate() QTimer.singleShot(2000, self.process.kill) @@ -119,9 +123,12 @@ self.__args = fn self.__recursive = recursive - self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) - self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(True) - self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Close).setEnabled(False) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Cancel).setEnabled(True) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Cancel).setDefault(True) self.refreshButton.setEnabled(False) self.process.kill() @@ -159,15 +166,18 @@ """ if ( self.process is not None and - self.process.state() != QProcess.NotRunning + self.process.state() != QProcess.ProcessState.NotRunning ): self.process.terminate() QTimer.singleShot(2000, self.process.kill) self.process.waitForFinished(3000) - self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) - self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) - self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Close).setEnabled(True) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Cancel).setEnabled(False) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Close).setDefault(True) self.refreshButton.setEnabled(True) @@ -183,9 +193,13 @@ @param button button that was clicked (QAbstractButton) """ - if button == self.buttonBox.button(QDialogButtonBox.Close): + if button == self.buttonBox.button( + QDialogButtonBox.StandardButton.Close + ): self.close() - elif button == self.buttonBox.button(QDialogButtonBox.Cancel): + elif button == self.buttonBox.button( + QDialogButtonBox.StandardButton.Cancel + ): self.__finish() elif button == self.refreshButton: self.on_refreshButton_clicked() @@ -216,7 +230,7 @@ It reads the output of the process, formats it and inserts it into the contents pane. """ - self.process.setReadChannel(QProcess.StandardOutput) + self.process.setReadChannel(QProcess.ProcessChannel.StandardOutput) while self.process.canReadLine(): s = str(self.process.readLine(),