Debugger/StartDialog.py

Sun, 11 Dec 2016 18:43:05 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 11 Dec 2016 18:43:05 +0100
changeset 5373
7826884089fd
parent 5372
7ba8d3d61fdd
child 5374
c18d759b6b86
permissions
-rw-r--r--

Added some TODOs to improve history handling of the debugger.

0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
4631
5c1a96925da4 Updated copyright for 2016.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4589
diff changeset
3 # Copyright (c) 2002 - 2016 Detlev Offenbach <detlev@die-offenbachs.de>
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing the Start Program dialog.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
3145
a9de05d4a22f # __IGNORE_WARNING__ added/ removed.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3058
diff changeset
10 from __future__ import unicode_literals
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
11
5372
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
12 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QComboBox, QInputDialog
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
4582
3a1d1d4c6f4f Modified more dialogs to use the path picker widgets.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
14 from E5Gui.E5PathPicker import E5PathPickerModes
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 import Preferences
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
18
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 class StartDialog(QDialog):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 Class implementing the Start Program dialog.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 It implements a dialog that is used to start an
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 application for debugging. It asks the user to enter
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 the commandline parameters, the working directory and
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 whether exception reporting should be disabled.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 """
2988
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
28 def __init__(self, caption, argvList, wdList, envList, exceptions,
3021
801289962f4e Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2988
diff changeset
29 parent=None, type=0, modfuncList=None, tracePython=False,
801289962f4e Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2988
diff changeset
30 autoClearShell=True, autoContinue=True, autoFork=False,
801289962f4e Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2988
diff changeset
31 forkChild=False):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 @param caption the caption to be displayed (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 @param argvList history list of commandline arguments (list of strings)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 @param wdList history list of working directories (list of strings)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 @param envList history list of environment settings (list of strings)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 @param exceptions exception reporting flag (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 @param parent parent widget of this dialog (QWidget)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 @param type type of the start dialog
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 <ul>
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 <li>0 = start debug dialog</li>
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 <li>1 = start run dialog</li>
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 <li>2 = start coverage dialog</li>
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 <li>3 = start profile dialog</li>
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 </ul>
2988
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
48 @keyparam modfuncList history list of module functions
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
49 (list of strings)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
50 @keyparam tracePython flag indicating if the Python library should
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 be traced as well (boolean)
2988
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
52 @keyparam autoClearShell flag indicating, that the interpreter window
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
53 should be cleared automatically (boolean)
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
54 @keyparam autoContinue flag indicating, that the debugger should not
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
55 stop at the first executable line (boolean)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 @keyparam autoFork flag indicating the automatic fork mode (boolean)
2988
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
57 @keyparam forkChild flag indicating to debug the child after forking
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
58 (boolean)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 """
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
60 super(StartDialog, self).__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 self.setModal(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 self.type = type
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 if type == 0:
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
65 from .Ui_StartDebugDialog import Ui_StartDebugDialog
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 self.ui = Ui_StartDebugDialog()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 elif type == 1:
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
68 from .Ui_StartRunDialog import Ui_StartRunDialog
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 self.ui = Ui_StartRunDialog()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 elif type == 2:
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
71 from .Ui_StartCoverageDialog import Ui_StartCoverageDialog
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 self.ui = Ui_StartCoverageDialog()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 elif type == 3:
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
74 from .Ui_StartProfileDialog import Ui_StartProfileDialog
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 self.ui = Ui_StartProfileDialog()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 self.ui.setupUi(self)
4582
3a1d1d4c6f4f Modified more dialogs to use the path picker widgets.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
77 self.ui.workdirPicker.setMode(E5PathPickerModes.DirectoryMode)
3a1d1d4c6f4f Modified more dialogs to use the path picker widgets.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
78 self.ui.workdirPicker.setDefaultDirectory(
3a1d1d4c6f4f Modified more dialogs to use the path picker widgets.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
79 Preferences.getMultiProject("Workspace"))
4589
b648ccbdbef9 Modified more dialogs to use the path picker widgets.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4582
diff changeset
80 self.ui.workdirPicker.setInsertPolicy(QComboBox.InsertAtTop)
b648ccbdbef9 Modified more dialogs to use the path picker widgets.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4582
diff changeset
81 self.ui.workdirPicker.setSizeAdjustPolicy(
b648ccbdbef9 Modified more dialogs to use the path picker widgets.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4582
diff changeset
82 QComboBox.AdjustToMinimumContentsLength)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 112
diff changeset
84 self.clearButton = self.ui.buttonBox.addButton(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3186
diff changeset
85 self.tr("Clear Histories"), QDialogButtonBox.ActionRole)
5372
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
86 self.editButton = self.ui.buttonBox.addButton(
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
87 self.tr("Edit History"), QDialogButtonBox.ActionRole)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 self.setWindowTitle(caption)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 self.ui.cmdlineCombo.clear()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 self.ui.cmdlineCombo.addItems(argvList)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 if len(argvList) > 0:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 self.ui.cmdlineCombo.setCurrentIndex(0)
4582
3a1d1d4c6f4f Modified more dialogs to use the path picker widgets.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
94 self.ui.workdirPicker.clear()
3a1d1d4c6f4f Modified more dialogs to use the path picker widgets.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
95 self.ui.workdirPicker.addItems(wdList)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 if len(wdList) > 0:
4582
3a1d1d4c6f4f Modified more dialogs to use the path picker widgets.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
97 self.ui.workdirPicker.setCurrentIndex(0)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 self.ui.environmentCombo.clear()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 self.ui.environmentCombo.addItems(envList)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 self.ui.exceptionCheckBox.setChecked(exceptions)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 self.ui.clearShellCheckBox.setChecked(autoClearShell)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 self.ui.consoleCheckBox.setEnabled(
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 Preferences.getDebugger("ConsoleDbgCommand") != "")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104 self.ui.consoleCheckBox.setChecked(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 if type == 0: # start debug dialog
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 self.ui.tracePythonCheckBox.setChecked(tracePython)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 self.ui.tracePythonCheckBox.show()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 self.ui.autoContinueCheckBox.setChecked(autoContinue)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 self.ui.forkModeCheckBox.setChecked(autoFork)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 self.ui.forkChildCheckBox.setChecked(forkChild)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112
112
16893e193e9d Added the auto fork options to the run dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
113 if type == 1: # start run dialog
16893e193e9d Added the auto fork options to the run dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
114 self.ui.forkModeCheckBox.setChecked(autoFork)
16893e193e9d Added the auto fork options to the run dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
115 self.ui.forkChildCheckBox.setChecked(forkChild)
16893e193e9d Added the auto fork options to the run dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
116
16893e193e9d Added the auto fork options to the run dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
117 if type == 3: # start coverage or profile dialog
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118 self.ui.eraseCheckBox.setChecked(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 self.__clearHistoryLists = False
5373
7826884089fd Added some TODOs to improve history handling of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5372
diff changeset
121 self.__historiesModified = False
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122
3366
6084bb3c3911 Made some changes to have a bunch of dialogs with correct sizes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
123 msh = self.minimumSizeHint()
6084bb3c3911 Made some changes to have a bunch of dialogs with correct sizes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
124 self.resize(max(self.width(), msh.width()), msh.height())
6084bb3c3911 Made some changes to have a bunch of dialogs with correct sizes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
125
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 def on_modFuncCombo_editTextChanged(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 Private slot to enable/disable the OK button.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 """
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 112
diff changeset
130 self.ui.buttonBox.button(QDialogButtonBox.Ok).setDisabled(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 self.ui.modFuncCombo.currentText() == "")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133 def getData(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 Public method to retrieve the data entered into this dialog.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
136
2988
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
137 @return a tuple of argv (string), workdir (string), environment
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
138 (string), exceptions flag (boolean), clear interpreter flag
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
139 (boolean), clear histories flag (boolean) and run in console
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
140 flag (boolean)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
141 """
5373
7826884089fd Added some TODOs to improve history handling of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5372
diff changeset
142 # TODO: add the complete histories
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
143 cmdLine = self.ui.cmdlineCombo.currentText()
4582
3a1d1d4c6f4f Modified more dialogs to use the path picker widgets.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
144 workdir = self.ui.workdirPicker.currentText()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
145 environment = self.ui.environmentCombo.currentText()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
147 return (cmdLine,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
148 workdir,
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
149 environment,
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
150 self.ui.exceptionCheckBox.isChecked(),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
151 self.ui.clearShellCheckBox.isChecked(),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
152 self.__clearHistoryLists,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
153 self.ui.consoleCheckBox.isChecked())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
154
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
155 def getDebugData(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
156 """
2988
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
157 Public method to retrieve the debug related data entered into this
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
158 dialog.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
159
2988
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
160 @return a tuple of a flag indicating, if the Python library should be
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
161 traced as well, a flag indicating, that the debugger should not
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
162 stop at the first executable line (boolean), a flag indicating,
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
163 that the debugger should fork automatically (boolean) and a flag
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
164 indicating, that the debugger should debug the child process after
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
165 forking automatically (boolean)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
166 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
167 if self.type == 0:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
168 return (self.ui.tracePythonCheckBox.isChecked(),
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
169 self.ui.autoContinueCheckBox.isChecked(),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
170 self.ui.forkModeCheckBox.isChecked(),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
171 self.ui.forkChildCheckBox.isChecked())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
172
112
16893e193e9d Added the auto fork options to the run dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
173 def getRunData(self):
16893e193e9d Added the auto fork options to the run dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
174 """
2988
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
175 Public method to retrieve the debug related data entered into this
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
176 dialog.
112
16893e193e9d Added the auto fork options to the run dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
177
2988
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
178 @return a tuple of a flag indicating, that the debugger should fork
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
179 automatically (boolean) and a flag indicating, that the debugger
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
180 should debug the child process after forking automatically
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
181 (boolean)
112
16893e193e9d Added the auto fork options to the run dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
182 """
16893e193e9d Added the auto fork options to the run dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
183 if self.type == 1:
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
184 return (self.ui.forkModeCheckBox.isChecked(),
112
16893e193e9d Added the auto fork options to the run dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
185 self.ui.forkChildCheckBox.isChecked())
16893e193e9d Added the auto fork options to the run dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
186
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
187 def getCoverageData(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
188 """
2988
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
189 Public method to retrieve the coverage related data entered into this
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
190 dialog.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
191
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
192 @return flag indicating erasure of coverage info (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
193 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
194 if self.type == 2:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
195 return self.ui.eraseCheckBox.isChecked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
196
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
197 def getProfilingData(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
198 """
2988
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
199 Public method to retrieve the profiling related data entered into this
f53c03574697 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
200 dialog.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
201
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
202 @return flag indicating erasure of profiling info (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
203 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
204 if self.type == 3:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
205 return self.ui.eraseCheckBox.isChecked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
206
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
207 def __clearHistories(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
208 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
209 Private slot to clear the combo boxes lists and record a flag to
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
210 clear the lists.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
211 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
212 self.__clearHistoryLists = True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
213
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
214 cmdLine = self.ui.cmdlineCombo.currentText()
4582
3a1d1d4c6f4f Modified more dialogs to use the path picker widgets.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
215 workdir = self.ui.workdirPicker.currentText()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
216 environment = self.ui.environmentCombo.currentText()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
217
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
218 self.ui.cmdlineCombo.clear()
4582
3a1d1d4c6f4f Modified more dialogs to use the path picker widgets.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
219 self.ui.workdirPicker.clear()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
220 self.ui.environmentCombo.clear()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
221
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
222 self.ui.cmdlineCombo.addItem(cmdLine)
4582
3a1d1d4c6f4f Modified more dialogs to use the path picker widgets.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
223 self.ui.workdirPicker.addItem(workdir)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
224 self.ui.environmentCombo.addItem(environment)
5372
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
225
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
226 def __editHistory(self):
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
227 """
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
228 Private slot to edit a history list.
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
229 """
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
230 histories = [
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
231 "",
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
232 self.tr("Command Line"),
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
233 self.tr("Working Directory"),
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
234 self.tr("Environment"),
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
235 ]
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
236 historyKind, ok = QInputDialog.getItem(
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
237 self,
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
238 self.tr("Edit History"),
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
239 self.tr("Select the history list to be edited:"),
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
240 histories,
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
241 0, False)
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
242 if ok and historyKind:
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
243 historiesIndex = histories.index(historyKind)
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
244 if historiesIndex == 2:
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
245 history = self.ui.workdirPicker.getPathItems()
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
246 else:
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
247 history = []
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
248 if historiesIndex == 1:
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
249 combo = self.ui.cmdlineCombo
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
250 else:
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
251 combo = self.ui.environmentCombo
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
252 for index in range(combo.count()):
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
253 history.append(combo.itemText(index))
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
254
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
255 from .StartHistoryEditDialog import StartHistoryEditDialog
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
256 dlg = StartHistoryEditDialog(history, self)
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
257 if dlg.exec_() == QDialog.Accepted:
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
258 history = dlg.getHistory()
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
259 if historiesIndex == 1:
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
260 combo = self.ui.cmdlineCombo
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
261 elif historiesIndex == 2:
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
262 combo = self.ui.workdirPicker
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
263 else:
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
264 combo = self.ui.environmentCombo
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
265 combo.clear()
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
266 combo.addItems(history)
5373
7826884089fd Added some TODOs to improve history handling of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5372
diff changeset
267
7826884089fd Added some TODOs to improve history handling of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5372
diff changeset
268 self.__historiesModified = True
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
269
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
270 def on_buttonBox_clicked(self, button):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
271 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
272 Private slot called by a button of the button box clicked.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
273
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
274 @param button button that was clicked (QAbstractButton)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
275 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
276 if button == self.clearButton:
880
52ed20236a1c Added the option to not use the native file dialog to prevent crashes on Linux.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
277 self.__clearHistories()
5372
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
278 elif button == self.editButton:
7ba8d3d61fdd Added the capability to edit the history lists to the start dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
279 self.__editHistory()

eric ide

mercurial