Added some TODOs to improve history handling of the debugger.

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

Added some TODOs to improve history handling of the debugger.

Debugger/DebugUI.py file | annotate | diff | comparison | revisions
Debugger/StartDialog.py file | annotate | diff | comparison | revisions
--- a/Debugger/DebugUI.py	Sun Dec 11 18:28:42 2016 +0100
+++ b/Debugger/DebugUI.py	Sun Dec 11 18:43:05 2016 +0100
@@ -650,13 +650,15 @@
         
         return [starttb, debugtb]
         
-    def setArgvHistory(self, argsStr, clearHistories=False):
+    # TODO: accept history list
+    def setArgvHistory(self, argsStr, clearHistories=False, history=None):
         """
         Public slot to initialize the argv history.
         
         @param argsStr the commandline arguments (string)
         @param clearHistories flag indicating, that the list should
             be cleared (boolean)
+        @param history list of history entries to be set (list of strings)
         """
         if clearHistories:
             self.argvHistory = []
@@ -665,13 +667,15 @@
                 self.argvHistory.remove(argsStr)
         self.argvHistory.insert(0, argsStr)
 
-    def setWdHistory(self, wdStr, clearHistories=False):
+    # TODO: accept history list
+    def setWdHistory(self, wdStr, clearHistories=False, history=None):
         """
         Public slot to initialize the wd history.
         
         @param wdStr the working directory (string)
         @param clearHistories flag indicating, that the list should
             be cleared (boolean)
+        @param history list of history entries to be set (list of strings)
         """
         if clearHistories:
             self.wdHistory = []
@@ -680,13 +684,15 @@
                 self.wdHistory.remove(wdStr)
         self.wdHistory.insert(0, wdStr)
         
-    def setEnvHistory(self, envStr, clearHistories=False):
+    # TODO: accept history list
+    def setEnvHistory(self, envStr, clearHistories=False, history=None):
         """
         Public slot to initialize the env history.
         
         @param envStr the environment settings (string)
         @param clearHistories flag indicating, that the list should
             be cleared (boolean)
+        @param history list of history entries to be set (list of strings)
         """
         if clearHistories:
             self.envHistory = []
@@ -1514,6 +1520,7 @@
             self.envHistory, self.exceptions, self.ui, 2,
             autoClearShell=self.autoClearShell)
         if dlg.exec_() == QDialog.Accepted:
+            # TODO: get the complete histories
             argv, wd, env, exceptions, clearShell, clearHistories, console = \
                 dlg.getData()
             eraseCoverage = dlg.getCoverageData()
@@ -1561,6 +1568,7 @@
             
             # This moves any previous occurrence of these arguments to the head
             # of the list.
+            # TODO: modify histories as retrieved
             self.setArgvHistory(argv, clearHistories)
             self.setWdHistory(wd, clearHistories)
             self.setEnvHistory(env, clearHistories)
@@ -1633,6 +1641,7 @@
             self.exceptions, self.ui, 3,
             autoClearShell=self.autoClearShell)
         if dlg.exec_() == QDialog.Accepted:
+            # TODO: get the complete histories
             argv, wd, env, exceptions, clearShell, clearHistories, console = \
                 dlg.getData()
             eraseTimings = dlg.getProfilingData()
@@ -1680,6 +1689,7 @@
             
             # This moves any previous occurrence of these arguments to the head
             # of the list.
+            # TODO: modify histories as retrieved
             self.setArgvHistory(argv, clearHistories)
             self.setWdHistory(wd, clearHistories)
             self.setEnvHistory(env, clearHistories)
@@ -1754,6 +1764,7 @@
             autoFork=self.forkAutomatically,
             forkChild=self.forkIntoChild)
         if dlg.exec_() == QDialog.Accepted:
+            # TODO: get the complete histories
             argv, wd, env, exceptions, clearShell, clearHistories, console = \
                 dlg.getData()
             forkAutomatically, forkIntoChild = dlg.getRunData()
@@ -1801,6 +1812,7 @@
             
             # This moves any previous occurrence of these arguments to the head
             # of the list.
+            # TODO: modify histories as retrieved
             self.setArgvHistory(argv, clearHistories)
             self.setWdHistory(wd, clearHistories)
             self.setEnvHistory(env, clearHistories)
@@ -1875,6 +1887,7 @@
             autoClearShell=self.autoClearShell, autoContinue=self.autoContinue,
             autoFork=self.forkAutomatically, forkChild=self.forkIntoChild)
         if dlg.exec_() == QDialog.Accepted:
+            # TODO: get the complete histories
             argv, wd, env, exceptions, clearShell, clearHistories, console = \
                 dlg.getData()
             tracePython, autoContinue, forkAutomatically, forkIntoChild = \
@@ -1924,6 +1937,7 @@
             
             # This moves any previous occurrence of these arguments to the head
             # of the list.
+            # TODO: modify histories as retrieved
             self.setArgvHistory(argv, clearHistories)
             self.setWdHistory(wd, clearHistories)
             self.setEnvHistory(env, clearHistories)
--- a/Debugger/StartDialog.py	Sun Dec 11 18:28:42 2016 +0100
+++ b/Debugger/StartDialog.py	Sun Dec 11 18:43:05 2016 +0100
@@ -118,6 +118,7 @@
             self.ui.eraseCheckBox.setChecked(True)
         
         self.__clearHistoryLists = False
+        self.__historiesModified = False
         
         msh = self.minimumSizeHint()
         self.resize(max(self.width(), msh.width()), msh.height())
@@ -138,6 +139,7 @@
             (boolean), clear histories flag (boolean) and run in console
             flag (boolean)
         """
+        # TODO: add the complete histories
         cmdLine = self.ui.cmdlineCombo.currentText()
         workdir = self.ui.workdirPicker.currentText()
         environment = self.ui.environmentCombo.currentText()
@@ -262,6 +264,8 @@
                     combo = self.ui.environmentCombo
                 combo.clear()
                 combo.addItems(history)
+                
+                self.__historiesModified = True
         
     def on_buttonBox_clicked(self, button):
         """

eric ide

mercurial