648 toolbarManager.addAction(self.coverageProjectAct, |
648 toolbarManager.addAction(self.coverageProjectAct, |
649 starttb.windowTitle()) |
649 starttb.windowTitle()) |
650 |
650 |
651 return [starttb, debugtb] |
651 return [starttb, debugtb] |
652 |
652 |
653 def setArgvHistory(self, argsStr, clearHistories=False): |
653 # TODO: accept history list |
|
654 def setArgvHistory(self, argsStr, clearHistories=False, history=None): |
654 """ |
655 """ |
655 Public slot to initialize the argv history. |
656 Public slot to initialize the argv history. |
656 |
657 |
657 @param argsStr the commandline arguments (string) |
658 @param argsStr the commandline arguments (string) |
658 @param clearHistories flag indicating, that the list should |
659 @param clearHistories flag indicating, that the list should |
659 be cleared (boolean) |
660 be cleared (boolean) |
|
661 @param history list of history entries to be set (list of strings) |
660 """ |
662 """ |
661 if clearHistories: |
663 if clearHistories: |
662 self.argvHistory = [] |
664 self.argvHistory = [] |
663 else: |
665 else: |
664 if argsStr in self.argvHistory: |
666 if argsStr in self.argvHistory: |
665 self.argvHistory.remove(argsStr) |
667 self.argvHistory.remove(argsStr) |
666 self.argvHistory.insert(0, argsStr) |
668 self.argvHistory.insert(0, argsStr) |
667 |
669 |
668 def setWdHistory(self, wdStr, clearHistories=False): |
670 # TODO: accept history list |
|
671 def setWdHistory(self, wdStr, clearHistories=False, history=None): |
669 """ |
672 """ |
670 Public slot to initialize the wd history. |
673 Public slot to initialize the wd history. |
671 |
674 |
672 @param wdStr the working directory (string) |
675 @param wdStr the working directory (string) |
673 @param clearHistories flag indicating, that the list should |
676 @param clearHistories flag indicating, that the list should |
674 be cleared (boolean) |
677 be cleared (boolean) |
|
678 @param history list of history entries to be set (list of strings) |
675 """ |
679 """ |
676 if clearHistories: |
680 if clearHistories: |
677 self.wdHistory = [] |
681 self.wdHistory = [] |
678 else: |
682 else: |
679 if wdStr in self.wdHistory: |
683 if wdStr in self.wdHistory: |
680 self.wdHistory.remove(wdStr) |
684 self.wdHistory.remove(wdStr) |
681 self.wdHistory.insert(0, wdStr) |
685 self.wdHistory.insert(0, wdStr) |
682 |
686 |
683 def setEnvHistory(self, envStr, clearHistories=False): |
687 # TODO: accept history list |
|
688 def setEnvHistory(self, envStr, clearHistories=False, history=None): |
684 """ |
689 """ |
685 Public slot to initialize the env history. |
690 Public slot to initialize the env history. |
686 |
691 |
687 @param envStr the environment settings (string) |
692 @param envStr the environment settings (string) |
688 @param clearHistories flag indicating, that the list should |
693 @param clearHistories flag indicating, that the list should |
689 be cleared (boolean) |
694 be cleared (boolean) |
|
695 @param history list of history entries to be set (list of strings) |
690 """ |
696 """ |
691 if clearHistories: |
697 if clearHistories: |
692 self.envHistory = [] |
698 self.envHistory = [] |
693 else: |
699 else: |
694 if envStr in self.envHistory: |
700 if envStr in self.envHistory: |
1512 dlg = StartDialog( |
1518 dlg = StartDialog( |
1513 cap, self.argvHistory, self.wdHistory, |
1519 cap, self.argvHistory, self.wdHistory, |
1514 self.envHistory, self.exceptions, self.ui, 2, |
1520 self.envHistory, self.exceptions, self.ui, 2, |
1515 autoClearShell=self.autoClearShell) |
1521 autoClearShell=self.autoClearShell) |
1516 if dlg.exec_() == QDialog.Accepted: |
1522 if dlg.exec_() == QDialog.Accepted: |
|
1523 # TODO: get the complete histories |
1517 argv, wd, env, exceptions, clearShell, clearHistories, console = \ |
1524 argv, wd, env, exceptions, clearShell, clearHistories, console = \ |
1518 dlg.getData() |
1525 dlg.getData() |
1519 eraseCoverage = dlg.getCoverageData() |
1526 eraseCoverage = dlg.getCoverageData() |
1520 |
1527 |
1521 if runProject: |
1528 if runProject: |
1559 self.lastDebuggedFile = fn |
1566 self.lastDebuggedFile = fn |
1560 self.restartAct.setEnabled(True) |
1567 self.restartAct.setEnabled(True) |
1561 |
1568 |
1562 # This moves any previous occurrence of these arguments to the head |
1569 # This moves any previous occurrence of these arguments to the head |
1563 # of the list. |
1570 # of the list. |
|
1571 # TODO: modify histories as retrieved |
1564 self.setArgvHistory(argv, clearHistories) |
1572 self.setArgvHistory(argv, clearHistories) |
1565 self.setWdHistory(wd, clearHistories) |
1573 self.setWdHistory(wd, clearHistories) |
1566 self.setEnvHistory(env, clearHistories) |
1574 self.setEnvHistory(env, clearHistories) |
1567 |
1575 |
1568 # Save the exception flags |
1576 # Save the exception flags |
1631 dlg = StartDialog( |
1639 dlg = StartDialog( |
1632 cap, self.argvHistory, self.wdHistory, self.envHistory, |
1640 cap, self.argvHistory, self.wdHistory, self.envHistory, |
1633 self.exceptions, self.ui, 3, |
1641 self.exceptions, self.ui, 3, |
1634 autoClearShell=self.autoClearShell) |
1642 autoClearShell=self.autoClearShell) |
1635 if dlg.exec_() == QDialog.Accepted: |
1643 if dlg.exec_() == QDialog.Accepted: |
|
1644 # TODO: get the complete histories |
1636 argv, wd, env, exceptions, clearShell, clearHistories, console = \ |
1645 argv, wd, env, exceptions, clearShell, clearHistories, console = \ |
1637 dlg.getData() |
1646 dlg.getData() |
1638 eraseTimings = dlg.getProfilingData() |
1647 eraseTimings = dlg.getProfilingData() |
1639 |
1648 |
1640 if runProject: |
1649 if runProject: |
1678 self.lastDebuggedFile = fn |
1687 self.lastDebuggedFile = fn |
1679 self.restartAct.setEnabled(True) |
1688 self.restartAct.setEnabled(True) |
1680 |
1689 |
1681 # This moves any previous occurrence of these arguments to the head |
1690 # This moves any previous occurrence of these arguments to the head |
1682 # of the list. |
1691 # of the list. |
|
1692 # TODO: modify histories as retrieved |
1683 self.setArgvHistory(argv, clearHistories) |
1693 self.setArgvHistory(argv, clearHistories) |
1684 self.setWdHistory(wd, clearHistories) |
1694 self.setWdHistory(wd, clearHistories) |
1685 self.setEnvHistory(env, clearHistories) |
1695 self.setEnvHistory(env, clearHistories) |
1686 |
1696 |
1687 # Save the exception flags |
1697 # Save the exception flags |
1752 self.exceptions, self.ui, 1, |
1762 self.exceptions, self.ui, 1, |
1753 autoClearShell=self.autoClearShell, |
1763 autoClearShell=self.autoClearShell, |
1754 autoFork=self.forkAutomatically, |
1764 autoFork=self.forkAutomatically, |
1755 forkChild=self.forkIntoChild) |
1765 forkChild=self.forkIntoChild) |
1756 if dlg.exec_() == QDialog.Accepted: |
1766 if dlg.exec_() == QDialog.Accepted: |
|
1767 # TODO: get the complete histories |
1757 argv, wd, env, exceptions, clearShell, clearHistories, console = \ |
1768 argv, wd, env, exceptions, clearShell, clearHistories, console = \ |
1758 dlg.getData() |
1769 dlg.getData() |
1759 forkAutomatically, forkIntoChild = dlg.getRunData() |
1770 forkAutomatically, forkIntoChild = dlg.getRunData() |
1760 |
1771 |
1761 if runProject: |
1772 if runProject: |
1799 self.lastDebuggedFile = fn |
1810 self.lastDebuggedFile = fn |
1800 self.restartAct.setEnabled(True) |
1811 self.restartAct.setEnabled(True) |
1801 |
1812 |
1802 # This moves any previous occurrence of these arguments to the head |
1813 # This moves any previous occurrence of these arguments to the head |
1803 # of the list. |
1814 # of the list. |
|
1815 # TODO: modify histories as retrieved |
1804 self.setArgvHistory(argv, clearHistories) |
1816 self.setArgvHistory(argv, clearHistories) |
1805 self.setWdHistory(wd, clearHistories) |
1817 self.setWdHistory(wd, clearHistories) |
1806 self.setEnvHistory(env, clearHistories) |
1818 self.setEnvHistory(env, clearHistories) |
1807 |
1819 |
1808 # Save the exception flags |
1820 # Save the exception flags |
1873 cap, self.argvHistory, self.wdHistory, self.envHistory, |
1885 cap, self.argvHistory, self.wdHistory, self.envHistory, |
1874 self.exceptions, self.ui, 0, tracePython=self.tracePython, |
1886 self.exceptions, self.ui, 0, tracePython=self.tracePython, |
1875 autoClearShell=self.autoClearShell, autoContinue=self.autoContinue, |
1887 autoClearShell=self.autoClearShell, autoContinue=self.autoContinue, |
1876 autoFork=self.forkAutomatically, forkChild=self.forkIntoChild) |
1888 autoFork=self.forkAutomatically, forkChild=self.forkIntoChild) |
1877 if dlg.exec_() == QDialog.Accepted: |
1889 if dlg.exec_() == QDialog.Accepted: |
|
1890 # TODO: get the complete histories |
1878 argv, wd, env, exceptions, clearShell, clearHistories, console = \ |
1891 argv, wd, env, exceptions, clearShell, clearHistories, console = \ |
1879 dlg.getData() |
1892 dlg.getData() |
1880 tracePython, autoContinue, forkAutomatically, forkIntoChild = \ |
1893 tracePython, autoContinue, forkAutomatically, forkIntoChild = \ |
1881 dlg.getDebugData() |
1894 dlg.getDebugData() |
1882 |
1895 |
1922 self.lastDebuggedFile = fn |
1935 self.lastDebuggedFile = fn |
1923 self.restartAct.setEnabled(True) |
1936 self.restartAct.setEnabled(True) |
1924 |
1937 |
1925 # This moves any previous occurrence of these arguments to the head |
1938 # This moves any previous occurrence of these arguments to the head |
1926 # of the list. |
1939 # of the list. |
|
1940 # TODO: modify histories as retrieved |
1927 self.setArgvHistory(argv, clearHistories) |
1941 self.setArgvHistory(argv, clearHistories) |
1928 self.setWdHistory(wd, clearHistories) |
1942 self.setWdHistory(wd, clearHistories) |
1929 self.setEnvHistory(env, clearHistories) |
1943 self.setEnvHistory(env, clearHistories) |
1930 |
1944 |
1931 # Save the exception flags |
1945 # Save the exception flags |