--- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnChangeListsDialog.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnChangeListsDialog.py Tue Mar 02 17:17:09 2021 +0100 @@ -36,10 +36,12 @@ """ super(SvnChangeListsDialog, self).__init__(parent) self.setupUi(self) - self.setWindowFlags(Qt.Window) + self.setWindowFlags(Qt.WindowType.Window) - 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.vcs = vcs @@ -130,27 +132,31 @@ """ 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.inputGroup.setEnabled(False) self.inputGroup.hide() if len(self.changeListsDict) == 0: self.changeLists.addItem(self.tr("No changelists found")) - self.buttonBox.button(QDialogButtonBox.Close).setFocus( - Qt.OtherFocusReason) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Close).setFocus( + Qt.FocusReason.OtherFocusReason) else: self.changeLists.addItems(sorted(self.changeListsDict.keys())) self.changeLists.setCurrentRow(0) - self.changeLists.setFocus(Qt.OtherFocusReason) + self.changeLists.setFocus(Qt.FocusReason.OtherFocusReason) def on_buttonBox_clicked(self, button): """ @@ -158,9 +164,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() def __procFinished(self, exitCode, exitStatus): @@ -180,7 +190,7 @@ the contents pane. """ if self.process is not None: - self.process.setReadChannel(QProcess.StandardOutput) + self.process.setReadChannel(QProcess.ProcessChannel.StandardOutput) while self.process.canReadLine(): s = str(self.process.readLine(), @@ -236,9 +246,9 @@ @param isOn flag indicating the status of the check box (boolean) """ if isOn: - self.input.setEchoMode(QLineEdit.Password) + self.input.setEchoMode(QLineEdit.EchoMode.Password) else: - self.input.setEchoMode(QLineEdit.Normal) + self.input.setEchoMode(QLineEdit.EchoMode.Normal) @pyqtSlot() def on_sendButton_clicked(self):