--- a/eric6/Debugger/DebugUI.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/Debugger/DebugUI.py Tue Mar 02 17:17:09 2021 +0100 @@ -201,7 +201,7 @@ self.tr('Run Script'), UI.PixmapCache.getIcon("runScript"), self.tr('&Run Script...'), - Qt.Key_F2, 0, self, 'dbg_run_script') + Qt.Key.Key_F2, 0, self, 'dbg_run_script') self.runAct.setStatusTip(self.tr('Run the current Script')) self.runAct.setWhatsThis(self.tr( """<b>Run Script</b>""" @@ -215,8 +215,9 @@ self.runProjectAct = E5Action( self.tr('Run Project'), UI.PixmapCache.getIcon("runProject"), - self.tr('Run &Project...'), Qt.SHIFT + Qt.Key_F2, 0, self, - 'dbg_run_project') + self.tr('Run &Project...'), + Qt.Modifier.SHIFT + Qt.Key.Key_F2, + 0, self, 'dbg_run_project') self.runProjectAct.setStatusTip(self.tr('Run the current Project')) self.runProjectAct.setWhatsThis(self.tr( """<b>Run Project</b>""" @@ -293,7 +294,7 @@ self.debugAct = E5Action( self.tr('Debug Script'), UI.PixmapCache.getIcon("debugScript"), - self.tr('&Debug Script...'), Qt.Key_F5, 0, self, + self.tr('&Debug Script...'), Qt.Key.Key_F5, 0, self, 'dbg_debug_script') self.debugAct.setStatusTip(self.tr('Debug the current Script')) self.debugAct.setWhatsThis(self.tr( @@ -309,8 +310,9 @@ self.debugProjectAct = E5Action( self.tr('Debug Project'), UI.PixmapCache.getIcon("debugProject"), - self.tr('Debug &Project...'), Qt.SHIFT + Qt.Key_F5, 0, self, - 'dbg_debug_project') + self.tr('Debug &Project...'), + Qt.Modifier.SHIFT + Qt.Key.Key_F5, + 0, self, 'dbg_debug_project') self.debugProjectAct.setStatusTip(self.tr( 'Debug the current Project')) self.debugProjectAct.setWhatsThis(self.tr( @@ -326,7 +328,7 @@ self.restartAct = E5Action( self.tr('Restart'), UI.PixmapCache.getIcon("debugRestart"), - self.tr('Restart'), Qt.Key_F4, 0, self, 'dbg_restart_script') + self.tr('Restart'), Qt.Key.Key_F4, 0, self, 'dbg_restart_script') self.restartAct.setStatusTip(self.tr( 'Restart the last debugged script')) self.restartAct.setWhatsThis(self.tr( @@ -342,7 +344,7 @@ self.stopAct = E5Action( self.tr('Stop'), UI.PixmapCache.getIcon("stopScript"), - self.tr('Stop'), Qt.SHIFT + Qt.Key_F10, 0, + self.tr('Stop'), Qt.Modifier.SHIFT + Qt.Key.Key_F10, 0, self, 'dbg_stop_script') self.stopAct.setStatusTip(self.tr("""Stop the running script.""")) self.stopAct.setWhatsThis(self.tr( @@ -357,7 +359,7 @@ act = E5Action( self.tr('Continue'), UI.PixmapCache.getIcon("continue"), - self.tr('&Continue'), Qt.Key_F6, 0, + self.tr('&Continue'), Qt.Key.Key_F6, 0, self.debugActGrp, 'dbg_continue') act.setStatusTip( self.tr('Continue running the program from the current line')) @@ -373,8 +375,9 @@ act = E5Action( self.tr('Continue to Cursor'), UI.PixmapCache.getIcon("continueToCursor"), - self.tr('Continue &To Cursor'), Qt.SHIFT + Qt.Key_F6, 0, - self.debugActGrp, 'dbg_continue_to_cursor') + self.tr('Continue &To Cursor'), + Qt.Modifier.SHIFT + Qt.Key.Key_F6, + 0, self.debugActGrp, 'dbg_continue_to_cursor') act.setStatusTip(self.tr( """Continue running the program from the""" """ current line to the current cursor position""")) @@ -389,7 +392,7 @@ act = E5Action( self.tr('Continue Until'), UI.PixmapCache.getIcon("continueUntil"), - self.tr('Continue &Until'), Qt.CTRL + Qt.Key_F6, 0, + self.tr('Continue &Until'), Qt.Modifier.CTRL + Qt.Key.Key_F6, 0, self.debugActGrp, 'dbg_continue_until') act.setStatusTip(self.tr( """Continue running the program from the current line to the""" @@ -406,7 +409,7 @@ act = E5Action( self.tr('Move Instruction Pointer to Cursor'), UI.PixmapCache.getIcon("moveInstructionPointer"), - self.tr('&Jump To Cursor'), Qt.Key_F12, 0, + self.tr('&Jump To Cursor'), Qt.Key.Key_F12, 0, self.debugActGrp, 'dbg_jump_to_cursor') act.setStatusTip(self.tr( """Skip the code from the""" @@ -426,7 +429,7 @@ act = E5Action( self.tr('Single Step'), UI.PixmapCache.getIcon("step"), - self.tr('Sin&gle Step'), Qt.Key_F7, 0, + self.tr('Sin&gle Step'), Qt.Key.Key_F7, 0, self.debugActGrp, 'dbg_single_step') act.setStatusTip(self.tr('Execute a single Python statement')) act.setWhatsThis(self.tr( @@ -442,7 +445,7 @@ act = E5Action( self.tr('Step Over'), UI.PixmapCache.getIcon("stepOver"), - self.tr('Step &Over'), Qt.Key_F8, 0, + self.tr('Step &Over'), Qt.Key.Key_F8, 0, self.debugActGrp, 'dbg_step_over') act.setStatusTip(self.tr( """Execute a single Python statement staying""" @@ -461,7 +464,7 @@ act = E5Action( self.tr('Step Out'), UI.PixmapCache.getIcon("stepOut"), - self.tr('Step Ou&t'), Qt.Key_F9, 0, + self.tr('Step Ou&t'), Qt.Key.Key_F9, 0, self.debugActGrp, 'dbg_step_out') act.setStatusTip(self.tr( """Execute Python statements until leaving""" @@ -480,7 +483,7 @@ act = E5Action( self.tr('Stop'), UI.PixmapCache.getIcon("stepQuit"), - self.tr('&Stop'), Qt.Key_F10, 0, + self.tr('&Stop'), Qt.Key.Key_F10, 0, self.debugActGrp, 'dbg_stop') act.setStatusTip(self.tr('Stop debugging')) act.setWhatsThis(self.tr( @@ -1472,7 +1475,7 @@ dlg = EditBreakpointDialog( (fn, line), (cond, temp, enabled, count), [], self.ui, modal=True) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: cond, temp, enabled, count = dlg.getData() model.setBreakPointByIndex(index, fn, line, (cond, temp, enabled, count)) @@ -1509,7 +1512,7 @@ from .EditWatchpointDialog import EditWatchpointDialog dlg = EditWatchpointDialog( (cond, temp, enabled, count, special), self.ui) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: cond, temp, enabled, count, special = dlg.getData() # check for duplicates @@ -1545,7 +1548,7 @@ dlg = VariablesFilterDialog(self.ui, 'Filter Dialog', True) dlg.setSelection(self.__localsVarFilterList, self.__globalsVarFilterList) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: self.__localsVarFilterList, self.__globalsVarFilterList = ( dlg.getSelection() ) @@ -1558,7 +1561,7 @@ """ from .ExceptionsFilterDialog import ExceptionsFilterDialog dlg = ExceptionsFilterDialog(self.excList, ignore=False) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: self.excList = dlg.getExceptionsList()[:] # keep a copy def __configureIgnoredExceptions(self): @@ -1567,7 +1570,7 @@ """ from .ExceptionsFilterDialog import ExceptionsFilterDialog dlg = ExceptionsFilterDialog(self.excIgnoreList, ignore=True) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: self.excIgnoreList = dlg.getExceptionsList()[:] # keep a copy def __toggleBreakpoint(self): @@ -1689,7 +1692,7 @@ cap, self.lastUsedVenvName, self.argvHistory, self.wdHistory, self.envHistory, self.exceptions, self.ui, 2, autoClearShell=self.autoClearShell) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: (lastUsedVenvName, argv, wd, env, exceptions, clearShell, console) = dlg.getData() eraseCoverage = dlg.getCoverageData() @@ -1826,7 +1829,7 @@ cap, self.lastUsedVenvName, self.argvHistory, self.wdHistory, self.envHistory, self.exceptions, self.ui, 3, autoClearShell=self.autoClearShell) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: (lastUsedVenvName, argv, wd, env, exceptions, clearShell, console) = dlg.getData() eraseTimings = dlg.getProfilingData() @@ -1963,7 +1966,7 @@ cap, self.lastUsedVenvName, self.argvHistory, self.wdHistory, self.envHistory, self.exceptions, self.ui, 1, autoClearShell=self.autoClearShell) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: (lastUsedVenvName, argv, wd, env, exceptions, clearShell, console) = dlg.getData() @@ -2099,7 +2102,7 @@ autoContinue=self.autoContinue, enableMultiprocess=self.enableMultiprocess, multiprocessNoDebugHistory=self.multiprocessNoDebugHistory) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: (lastUsedVenvName, argv, wd, env, exceptions, clearShell, console) = dlg.getData() (tracePython, autoContinue, enableMultiprocess,