Added code to use new functionality available with eric6 20.11. release-7.1.2

Fri, 16 Oct 2020 17:43:32 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 16 Oct 2020 17:43:32 +0200
changeset 91
9dc14465123e
parent 90
0cc79542c127
child 92
d0f1d0d377e5

Added code to use new functionality available with eric6 20.11.

ChangeLog file | annotate | diff | comparison | revisions
PluginPyLint.py file | annotate | diff | comparison | revisions
PluginPyLint.zip file | annotate | diff | comparison | revisions
PyLint/PyLintExecDialog.py file | annotate | diff | comparison | revisions
diff -r 0cc79542c127 -r 9dc14465123e ChangeLog
--- a/ChangeLog	Wed Oct 14 19:46:42 2020 +0200
+++ b/ChangeLog	Fri Oct 16 17:43:32 2020 +0200
@@ -1,5 +1,8 @@
 ChangeLog
 ---------
+Version 7.1.2:
+- added code to use new functionality available with eric6 20.11
+
 Version 7.1.1:
 - changed code to use the 'open()' context manager
 
diff -r 0cc79542c127 -r 9dc14465123e PluginPyLint.py
--- a/PluginPyLint.py	Wed Oct 14 19:46:42 2020 +0200
+++ b/PluginPyLint.py	Fri Oct 16 17:43:32 2020 +0200
@@ -29,7 +29,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "7.1.1"
+version = "7.1.2"
 className = "PyLintPlugin"
 packageName = "PyLint"
 shortDescription = "Show the PyLint dialogs."
diff -r 0cc79542c127 -r 9dc14465123e PluginPyLint.zip
Binary file PluginPyLint.zip has changed
diff -r 0cc79542c127 -r 9dc14465123e PyLint/PyLintExecDialog.py
--- 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