diff -r 8a7677a63c8d -r 68ec9c3d4de5 eric7/Debugger/DebugUI.py --- a/eric7/Debugger/DebugUI.py Sat May 22 17:01:51 2021 +0200 +++ b/eric7/Debugger/DebugUI.py Sat May 22 18:51:46 2021 +0200 @@ -15,8 +15,8 @@ from PyQt6.QtGui import QKeySequence from PyQt6.QtWidgets import QMenu, QToolBar, QApplication, QDialog -from E5Gui.E5Action import E5Action, createActionGroup -from E5Gui import E5MessageBox +from E5Gui.EricAction import EricAction, createActionGroup +from E5Gui import EricMessageBox from UI.Info import Program from UI.NotificationWidget import NotificationTypes @@ -205,7 +205,7 @@ """ self.actions = [] - self.runAct = E5Action( + self.runAct = EricAction( self.tr('Run Script'), UI.PixmapCache.getIcon("runScript"), self.tr('&Run Script...'), @@ -220,7 +220,7 @@ self.runAct.triggered.connect(self.__runScript) self.actions.append(self.runAct) - self.runProjectAct = E5Action( + self.runProjectAct = EricAction( self.tr('Run Project'), UI.PixmapCache.getIcon("runProject"), self.tr('Run &Project...'), @@ -237,7 +237,7 @@ self.runProjectAct.triggered.connect(self.__runProject) self.actions.append(self.runProjectAct) - self.coverageAct = E5Action( + self.coverageAct = EricAction( self.tr('Coverage run of Script'), UI.PixmapCache.getIcon("coverageScript"), self.tr('Coverage run of Script...'), 0, 0, self, @@ -253,7 +253,7 @@ self.coverageAct.triggered.connect(self.__coverageScript) self.actions.append(self.coverageAct) - self.coverageProjectAct = E5Action( + self.coverageProjectAct = EricAction( self.tr('Coverage run of Project'), UI.PixmapCache.getIcon("coverageProject"), self.tr('Coverage run of Project...'), 0, 0, self, @@ -270,7 +270,7 @@ self.coverageProjectAct.triggered.connect(self.__coverageProject) self.actions.append(self.coverageProjectAct) - self.profileAct = E5Action( + self.profileAct = EricAction( self.tr('Profile Script'), UI.PixmapCache.getIcon("profileScript"), self.tr('Profile Script...'), 0, 0, self, 'dbg_profile_script') @@ -283,7 +283,7 @@ self.profileAct.triggered.connect(self.__profileScript) self.actions.append(self.profileAct) - self.profileProjectAct = E5Action( + self.profileProjectAct = EricAction( self.tr('Profile Project'), UI.PixmapCache.getIcon("profileProject"), self.tr('Profile Project...'), 0, 0, self, @@ -299,7 +299,7 @@ self.profileProjectAct.triggered.connect(self.__profileProject) self.actions.append(self.profileProjectAct) - self.debugAct = E5Action( + self.debugAct = EricAction( self.tr('Debug Script'), UI.PixmapCache.getIcon("debugScript"), self.tr('&Debug Script...'), Qt.Key.Key_F5, 0, self, @@ -315,7 +315,7 @@ self.debugAct.triggered.connect(self.__debugScript) self.actions.append(self.debugAct) - self.debugProjectAct = E5Action( + self.debugProjectAct = EricAction( self.tr('Debug Project'), UI.PixmapCache.getIcon("debugProject"), self.tr('Debug &Project...'), @@ -333,7 +333,7 @@ self.debugProjectAct.triggered.connect(self.__debugProject) self.actions.append(self.debugProjectAct) - self.restartAct = E5Action( + self.restartAct = EricAction( self.tr('Restart'), UI.PixmapCache.getIcon("debugRestart"), self.tr('Restart'), Qt.Key.Key_F4, 0, self, 'dbg_restart_script') @@ -349,7 +349,7 @@ self.restartAct.triggered.connect(self.__doRestart) self.actions.append(self.restartAct) - self.stopAct = E5Action( + self.stopAct = EricAction( self.tr('Stop'), UI.PixmapCache.getIcon("stopScript"), self.tr('Stop'), @@ -366,7 +366,7 @@ self.debugActGrp = createActionGroup(self) - act = E5Action( + act = EricAction( self.tr('Continue'), UI.PixmapCache.getIcon("continue"), self.tr('&Continue'), Qt.Key.Key_F6, 0, @@ -382,7 +382,7 @@ act.triggered.connect(self.__continue) self.actions.append(act) - act = E5Action( + act = EricAction( self.tr('Continue to Cursor'), UI.PixmapCache.getIcon("continueToCursor"), self.tr('Continue &To Cursor'), @@ -399,7 +399,7 @@ act.triggered.connect(self.__runToCursor) self.actions.append(act) - act = E5Action( + act = EricAction( self.tr('Continue Until'), UI.PixmapCache.getIcon("continueUntil"), self.tr('Continue &Until'), @@ -418,7 +418,7 @@ act.triggered.connect(self.__runUntil) self.actions.append(act) - act = E5Action( + act = EricAction( self.tr('Move Instruction Pointer to Cursor'), UI.PixmapCache.getIcon("moveInstructionPointer"), self.tr('&Jump To Cursor'), Qt.Key.Key_F12, 0, @@ -438,7 +438,7 @@ act.triggered.connect(self.__moveInstructionPointer) self.actions.append(act) - act = E5Action( + act = EricAction( self.tr('Single Step'), UI.PixmapCache.getIcon("step"), self.tr('Sin&gle Step'), Qt.Key.Key_F7, 0, @@ -454,7 +454,7 @@ act.triggered.connect(self.__step) self.actions.append(act) - act = E5Action( + act = EricAction( self.tr('Step Over'), UI.PixmapCache.getIcon("stepOver"), self.tr('Step &Over'), Qt.Key.Key_F8, 0, @@ -473,7 +473,7 @@ act.triggered.connect(self.__stepOver) self.actions.append(act) - act = E5Action( + act = EricAction( self.tr('Step Out'), UI.PixmapCache.getIcon("stepOut"), self.tr('Step Ou&t'), Qt.Key.Key_F9, 0, @@ -492,7 +492,7 @@ act.triggered.connect(self.__stepOut) self.actions.append(act) - act = E5Action( + act = EricAction( self.tr('Stop'), UI.PixmapCache.getIcon("stepQuit"), self.tr('&Stop'), Qt.Key.Key_F10, 0, @@ -505,7 +505,7 @@ act.triggered.connect(self.__stepQuit) self.actions.append(act) - self.dbgFilterAct = E5Action( + self.dbgFilterAct = EricAction( self.tr('Variables Type Filter'), self.tr('Varia&bles Type Filter...'), 0, 0, self, 'dbg_variables_filter') @@ -521,7 +521,7 @@ self.__configureVariablesFilters) self.actions.append(self.dbgFilterAct) - self.excFilterAct = E5Action( + self.excFilterAct = EricAction( self.tr('Exceptions Filter'), self.tr('&Exceptions Filter...'), 0, 0, self, 'dbg_exceptions_filter') @@ -538,7 +538,7 @@ self.__configureExceptionsFilter) self.actions.append(self.excFilterAct) - self.excIgnoreFilterAct = E5Action( + self.excIgnoreFilterAct = EricAction( self.tr('Ignored Exceptions'), self.tr('&Ignored Exceptions...'), 0, 0, self, 'dbg_ignored_exceptions') @@ -557,7 +557,7 @@ self.dbgSetBpActGrp = createActionGroup(self) - self.dbgToggleBpAct = E5Action( + self.dbgToggleBpAct = EricAction( self.tr('Toggle Breakpoint'), UI.PixmapCache.getIcon("breakpointToggle"), self.tr('Toggle Breakpoint'), @@ -572,7 +572,7 @@ self.dbgToggleBpAct.triggered.connect(self.__toggleBreakpoint) self.actions.append(self.dbgToggleBpAct) - self.dbgEditBpAct = E5Action( + self.dbgEditBpAct = EricAction( self.tr('Edit Breakpoint'), UI.PixmapCache.getIcon("cBreakpointToggle"), self.tr('Edit Breakpoint...'), @@ -587,7 +587,7 @@ self.dbgEditBpAct.triggered.connect(self.__editBreakpoint) self.actions.append(self.dbgEditBpAct) - self.dbgNextBpAct = E5Action( + self.dbgNextBpAct = EricAction( self.tr('Next Breakpoint'), UI.PixmapCache.getIcon("breakpointNext"), self.tr('Next Breakpoint'), @@ -602,7 +602,7 @@ self.dbgNextBpAct.triggered.connect(self.__nextBreakpoint) self.actions.append(self.dbgNextBpAct) - self.dbgPrevBpAct = E5Action( + self.dbgPrevBpAct = EricAction( self.tr('Previous Breakpoint'), UI.PixmapCache.getIcon("breakpointPrevious"), self.tr('Previous Breakpoint'), @@ -617,7 +617,7 @@ self.dbgPrevBpAct.triggered.connect(self.__previousBreakpoint) self.actions.append(self.dbgPrevBpAct) - act = E5Action( + act = EricAction( self.tr('Clear Breakpoints'), self.tr('Clear Breakpoints'), 0, 0, @@ -690,7 +690,7 @@ Public slot to initialize the debug toolbars. @param toolbarManager reference to a toolbar manager object - (E5ToolBarManager) + (EricToolBarManager) @return the generated toolbars (list of QToolBar) """ starttb = QToolBar(self.tr("Start"), self.ui) @@ -1181,7 +1181,7 @@ self.ui.activateWindow() if message is None: - E5MessageBox.critical( + EricMessageBox.critical( self.ui, Program, self.tr( 'The program being debugged contains an unspecified' @@ -1200,7 +1200,7 @@ if os.path.exists(os.path.join(d, filename)): filename = os.path.join(d, filename) self.viewmanager.setFileLine(filename, lineNo, True, True) - E5MessageBox.critical( + EricMessageBox.critical( self.ui, Program, self.tr('<p>The file <b>{0}</b> contains the syntax error' ' <b>{1}</b> at line <b>{2}</b>, character <b>{3}</b>.' @@ -1224,7 +1224,7 @@ self.ui.raise_() QApplication.processEvents() if not exceptionType: - E5MessageBox.critical( + EricMessageBox.critical( self.ui, Program, self.tr('An unhandled exception occured.' ' See the shell window for details.')) @@ -1251,23 +1251,23 @@ lineFlags += Utilities.extractLineFlags( source[line].strip(), flagsLine=True) if "__IGNORE_EXCEPTION__" in lineFlags: - res = E5MessageBox.No - if res != E5MessageBox.No: + res = EricMessageBox.No + if res != EricMessageBox.No: self.viewmanager.setFileLine( stackTrace[0][0], stackTrace[0][1], True) - if res != E5MessageBox.No: + if res != EricMessageBox.No: self.ui.activateWindow() if Preferences.getDebugger("BreakAlways"): - res = E5MessageBox.Yes + res = EricMessageBox.Yes else: if stackTrace: if exceptionType.startswith('unhandled'): - buttons = E5MessageBox.No | E5MessageBox.Yes + buttons = EricMessageBox.No | EricMessageBox.Yes else: - buttons = (E5MessageBox.No | - E5MessageBox.Yes | - E5MessageBox.Ignore) - res = E5MessageBox.critical( + buttons = (EricMessageBox.No | + EricMessageBox.Yes | + EricMessageBox.Ignore) + res = EricMessageBox.critical( self.ui, Program, self.tr( '<p>The debugged program raised the exception' @@ -1280,9 +1280,9 @@ stackTrace[0][0], stackTrace[0][1]), buttons, - E5MessageBox.No) + EricMessageBox.No) else: - res = E5MessageBox.critical( + res = EricMessageBox.critical( self.ui, Program, self.tr( '<p>The debugged program raised the exception' @@ -1290,7 +1290,7 @@ .format( exceptionType, Utilities.html_encode(exceptionMessage))) - if res == E5MessageBox.Yes: + if res == EricMessageBox.Yes: self.debugServer.setDebugging(True) self.exceptionInterrupt.emit() stack = [] @@ -1303,7 +1303,7 @@ self.debugActGrp.setEnabled(True) return elif ( - res == E5MessageBox.Ignore and + res == EricMessageBox.Ignore and exceptionType not in self.excIgnoreList ): self.excIgnoreList.append(exceptionType) @@ -1338,7 +1338,7 @@ self.ui.activateWindow() QApplication.processEvents() self.viewmanager.setFileLine(filename, lineNo, True) - E5MessageBox.critical( + EricMessageBox.critical( self.ui, Program, self.tr("""<p>The program generate the signal "{0}".<br/>""" """File: <b>{1}</b>, Line: <b>{2}</b></p>""").format( @@ -1352,7 +1352,7 @@ """ self.__resetUI() if unplanned: - E5MessageBox.information( + EricMessageBox.information( self.ui, Program, self.tr('The program being debugged has terminated' ' unexpectedly.')) @@ -1459,7 +1459,7 @@ @param debuggerId ID of the debugger backend @type str """ - E5MessageBox.critical( + EricMessageBox.critical( self.ui, self.tr("Breakpoint Condition Error"), self.tr( @@ -1498,7 +1498,7 @@ @param debuggerId ID of the debugger backend @type str """ - E5MessageBox.critical( + EricMessageBox.critical( self.ui, self.tr("Watch Expression Error"), self.tr("""<p>The watch expression <b>{0}</b>""" @@ -1538,7 +1538,7 @@ """ for the variable <b>{1}</b> already""" """ exists.</p>""" ).format(special, Utilities.html_encode(cond)) - E5MessageBox.warning( + EricMessageBox.warning( self.ui, self.tr("Watch expression already exists"), msg) @@ -1707,7 +1707,7 @@ if runProject: fn = self.project.getMainScript(True) if fn is None: - E5MessageBox.critical( + EricMessageBox.critical( self.ui, self.tr("Coverage of Project"), self.tr( @@ -1852,7 +1852,7 @@ if runProject: fn = self.project.getMainScript(True) if fn is None: - E5MessageBox.critical( + EricMessageBox.critical( self.ui, self.tr("Profile of Project"), self.tr( @@ -1996,7 +1996,7 @@ if runProject: fn = self.project.getMainScript(True) if fn is None: - E5MessageBox.critical( + EricMessageBox.critical( self.ui, self.tr("Run Project"), self.tr( @@ -2142,7 +2142,7 @@ if debugProject: fn = self.project.getMainScript(True) if fn is None: - E5MessageBox.critical( + EricMessageBox.critical( self.ui, self.tr("Debug Project"), self.tr( @@ -2554,7 +2554,7 @@ """ Public method to get a list of all actions. - @return list of all actions (list of E5Action) + @return list of all actions (list of EricAction) """ return self.actions[:]