--- a/src/eric7/Tasks/Task.py Tue Oct 18 16:05:20 2022 +0200 +++ b/src/eric7/Tasks/Task.py Tue Oct 18 16:06:21 2022 +0200 @@ -15,8 +15,8 @@ from PyQt6.QtCore import Qt, QUuid from PyQt6.QtWidgets import QTreeWidgetItem -import UI.PixmapCache -import Preferences +from eric7.EricGui import EricPixmapCache +from eric7 import Preferences class TaskType(enum.IntEnum): @@ -143,10 +143,10 @@ self.setData(4, Qt.ItemDataRole.DisplayRole, self.lineno or "") if self.completed: - self.setIcon(0, UI.PixmapCache.getIcon("taskCompleted")) + self.setIcon(0, EricPixmapCache.getIcon("taskCompleted")) strikeOut = True else: - self.setIcon(0, UI.PixmapCache.getIcon("empty")) + self.setIcon(0, EricPixmapCache.getIcon("empty")) strikeOut = False for column in range(2, 5): f = self.font(column) @@ -205,13 +205,13 @@ self.priority = priority if self.priority == TaskPriority.NORMAL: - self.setIcon(1, UI.PixmapCache.getIcon("empty")) + self.setIcon(1, EricPixmapCache.getIcon("empty")) elif self.priority == TaskPriority.HIGH: - self.setIcon(1, UI.PixmapCache.getIcon("taskPrioHigh")) + self.setIcon(1, EricPixmapCache.getIcon("taskPrioHigh")) elif self.priority == TaskPriority.LOW: - self.setIcon(1, UI.PixmapCache.getIcon("taskPrioLow")) + self.setIcon(1, EricPixmapCache.getIcon("taskPrioLow")) else: - self.setIcon(1, UI.PixmapCache.getIcon("empty")) + self.setIcon(1, EricPixmapCache.getIcon("empty")) def setTaskType(self, taskType): """ @@ -224,10 +224,10 @@ try: self.setIcon( - 2, UI.PixmapCache.getIcon(Task.TaskType2IconName[self.taskType]) + 2, EricPixmapCache.getIcon(Task.TaskType2IconName[self.taskType]) ) except KeyError: - self.setIcon(2, UI.PixmapCache.getIcon("empty")) + self.setIcon(2, EricPixmapCache.getIcon("empty")) self.colorizeTask() @@ -239,10 +239,10 @@ """ self.completed = completed if self.completed: - self.setIcon(0, UI.PixmapCache.getIcon("taskCompleted")) + self.setIcon(0, EricPixmapCache.getIcon("taskCompleted")) strikeOut = True else: - self.setIcon(0, UI.PixmapCache.getIcon("empty")) + self.setIcon(0, EricPixmapCache.getIcon("empty")) strikeOut = False for column in range(2, 5): f = self.font(column)