10 import pathlib |
10 import pathlib |
11 |
11 |
12 from PyQt6.QtCore import QItemSelectionModel, QSortFilterProxyModel, Qt, pyqtSignal |
12 from PyQt6.QtCore import QItemSelectionModel, QSortFilterProxyModel, Qt, pyqtSignal |
13 from PyQt6.QtWidgets import QAbstractItemView, QDialog, QHeaderView, QMenu, QTreeView |
13 from PyQt6.QtWidgets import QAbstractItemView, QDialog, QHeaderView, QMenu, QTreeView |
14 |
14 |
15 from eric7 import Preferences |
15 from eric7 import EricUtilities, Preferences |
16 from eric7.EricWidgets.EricApplication import ericApp |
16 from eric7.EricWidgets.EricApplication import ericApp |
17 from eric7.Globals import recentNameBreakpointConditions, recentNameBreakpointFiles |
17 from eric7.Globals import recentNameBreakpointConditions, recentNameBreakpointFiles |
18 |
18 |
19 |
19 |
20 class BreakPointViewer(QTreeView): |
20 class BreakPointViewer(QTreeView): |
517 # load recently used file names |
517 # load recently used file names |
518 fnHistory = [] |
518 fnHistory = [] |
519 fnHistory.append("") |
519 fnHistory.append("") |
520 rs = Preferences.Prefs.rsettings.value(recentNameBreakpointFiles) |
520 rs = Preferences.Prefs.rsettings.value(recentNameBreakpointFiles) |
521 if rs is not None: |
521 if rs is not None: |
522 recent = [f for f in Preferences.toList(rs) if pathlib.Path(f).exists()] |
522 recent = [f for f in EricUtilities.toList(rs) if pathlib.Path(f).exists()] |
523 fnHistory.extend(recent[: Preferences.getDebugger("RecentNumber")]) |
523 fnHistory.extend(recent[: Preferences.getDebugger("RecentNumber")]) |
524 |
524 |
525 # load recently entered condition expressions |
525 # load recently entered condition expressions |
526 condHistory = [] |
526 condHistory = [] |
527 rs = Preferences.Prefs.rsettings.value(recentNameBreakpointConditions) |
527 rs = Preferences.Prefs.rsettings.value(recentNameBreakpointConditions) |
528 if rs is not None: |
528 if rs is not None: |
529 condHistory = Preferences.toList(rs)[ |
529 condHistory = EricUtilities.toList(rs)[ |
530 : Preferences.getDebugger("RecentNumber") |
530 : Preferences.getDebugger("RecentNumber") |
531 ] |
531 ] |
532 |
532 |
533 return fnHistory, condHistory |
533 return fnHistory, condHistory |
534 |
534 |