eric6/PipInterface/PipDialog.py

changeset 7828
4588940a2c19
parent 7826
704c46e040a2
child 7900
72b88fb20261
child 7924
8a96736d465e
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