PyLint/PyLintExecDialog.py

changeset 91
9dc14465123e
parent 89
8acd446fb6e6
child 93
5415a36586c7
--- a/PyLint/PyLintExecDialog.py	Wed Oct 14 19:46:42 2020 +0200
+++ b/PyLint/PyLintExecDialog.py	Fri Oct 16 17:43:32 2020 +0200
@@ -9,14 +9,19 @@
 
 import os
 
-from PyQt5.QtCore import QTimer, QProcess, Qt, pyqtSlot
-from PyQt5.QtGui import QCursor, QTextCursor
+from PyQt5.QtCore import  pyqtSlot, Qt, QTimer, QProcess
+from PyQt5.QtGui import QTextCursor
 from PyQt5.QtWidgets import (
     QWidget, QHeaderView, QApplication, QDialogButtonBox, QTreeWidgetItem
 )
 
 from E5Gui import E5MessageBox, E5FileDialog
 from E5Gui.E5Application import e5App
+try:
+    from E5Gui.E5OverrideCursor import E5OverrideCursorProcess
+except ImportError:
+    # workaround for eric6 < 20.11
+    E5OverrideCursorProcess = QProcess
 
 from .Ui_PyLintExecDialog import Ui_PyLintExecDialog
 
@@ -108,7 +113,7 @@
         del args[0]
         args.append(self.filename)
         
-        self.process = QProcess()
+        self.process = E5OverrideCursorProcess()
         self.process.setWorkingDirectory(self.pathname)
         
         self.process.readyReadStandardError.connect(self.__readStderr)
@@ -149,8 +154,6 @@
                     'The process {0} could not be started. '
                     'Ensure, that it is in the search path.'
                 ).format(program))
-        else:
-            self.setCursor(QCursor(Qt.WaitCursor))
         return procStarted
     
     def on_buttonBox_clicked(self, button):
@@ -175,8 +178,6 @@
         It is called when the process finished or
         the user pressed the button.
         """
-        self.unsetCursor()
-        
         if self.htmlOutput:
             self.contents.setHtml(self.buf)
         else:

eric ide

mercurial