PipDialog: removed some redundant code.

Wed, 11 Nov 2020 17:51:36 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 11 Nov 2020 17:51:36 +0100
changeset 7828
4588940a2c19
parent 7827
3d42837a8b66
child 7829
5a99dd3ebe5f

PipDialog: removed some redundant code.

eric6/PipInterface/PipDialog.py file | annotate | diff | comparison | revisions
diff -r 3d42837a8b66 -r 4588940a2c19 eric6/PipInterface/PipDialog.py
--- a/eric6/PipInterface/PipDialog.py	Sun Nov 08 16:00:57 2020 +0100
+++ b/eric6/PipInterface/PipDialog.py	Wed Nov 11 17:51:36 2020 +0100
@@ -89,22 +89,7 @@
         Private slot to cancel the current action.
         """
         self.__processQueue = []
-        
-        if (
-            self.proc is not None and
-            self.proc.state() != QProcess.NotRunning
-        ):
-            self.proc.terminate()
-            QTimer.singleShot(2000, self.proc.kill)
-            self.proc.waitForFinished(3000)
-        
-        self.proc = None
-        
-        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.Close).setFocus(
-            Qt.OtherFocusReason)
+        self.__finish()
     
     @pyqtSlot(QAbstractButton)
     def on_buttonBox_clicked(self, button):

eric ide

mercurial