Plugins/VcsPlugins/vcsMercurial/GpgExtension/HgGpgSignaturesDialog.py

changeset 1256
885706dbb69f
parent 1250
dafdd7d97a9f
child 1260
9488a3aceb0e
--- a/Plugins/VcsPlugins/vcsMercurial/GpgExtension/HgGpgSignaturesDialog.py	Wed Aug 31 18:44:04 2011 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/GpgExtension/HgGpgSignaturesDialog.py	Wed Aug 31 19:28:49 2011 +0200
@@ -54,11 +54,15 @@
         
         @param e close event (QCloseEvent)
         """
-        if self.process is not None and \
-           self.process.state() != QProcess.NotRunning:
-            self.process.terminate()
-            QTimer.singleShot(2000, self.process.kill)
-            self.process.waitForFinished(3000)
+        if self.__hgClient:
+            if self.__hgClient.isExecuting():
+                self.__hgClient.cancel()
+        else:
+            if self.process is not None and \
+               self.process.state() != QProcess.NotRunning:
+                self.process.terminate()
+                QTimer.singleShot(2000, self.process.kill)
+                self.process.waitForFinished(3000)
         
         e.accept()
     
@@ -96,6 +100,8 @@
             if out:
                 for line in out.splitlines():
                     self.__processOutputLine(line)
+                    if self.__hgClient.wasCanceled():
+                        break
             self.__finish()
         else:
             self.process.kill()

eric ide

mercurial