18 from PyQt6.QtGui import QBrush |
18 from PyQt6.QtGui import QBrush |
19 from PyQt6.QtWidgets import ( |
19 from PyQt6.QtWidgets import ( |
20 QTreeWidgetItem, QAbstractItemView, QWidget, QMenu |
20 QTreeWidgetItem, QAbstractItemView, QWidget, QMenu |
21 ) |
21 ) |
22 |
22 |
23 from E5Gui.E5Application import e5App |
23 from E5Gui.EricApplication import ericApp |
24 from E5Gui.E5OverrideCursor import E5OverrideCursor |
24 from E5Gui.EricOverrideCursor import EricOverrideCursor |
25 |
25 |
26 import Preferences |
26 import Preferences |
27 |
27 |
28 from .Ui_PythonDisViewer import Ui_PythonDisViewer |
28 from .Ui_PythonDisViewer import Ui_PythonDisViewer |
29 |
29 |
473 return |
473 return |
474 |
474 |
475 filename = self.__editor.getFileName() |
475 filename = self.__editor.getFileName() |
476 filename = os.path.basename(filename) if filename else "<dis>" |
476 filename = os.path.basename(filename) if filename else "<dis>" |
477 |
477 |
478 with E5OverrideCursor(): |
478 with EricOverrideCursor(): |
479 try: |
479 try: |
480 codeObject = self.__tryCompile(source, filename) |
480 codeObject = self.__tryCompile(source, filename) |
481 except Exception as exc: |
481 except Exception as exc: |
482 codeObject = None |
482 codeObject = None |
483 self.__createErrorItem(str(exc)) |
483 self.__createErrorItem(str(exc)) |