eric6/Tasks/Task.py

changeset 8143
2c730d5fd177
parent 8011
630a173cb137
child 8218
7c09585bd960
diff -r 27f636beebad -r 2c730d5fd177 eric6/Tasks/Task.py
--- a/eric6/Tasks/Task.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/Tasks/Task.py	Tue Mar 02 17:17:09 2021 +0100
@@ -100,11 +100,11 @@
         if isProjectTask:
             self.filename = self.project.getRelativePath(self.filename)
             
-        self.setData(0, Qt.DisplayRole, "")
-        self.setData(1, Qt.DisplayRole, "")
-        self.setData(2, Qt.DisplayRole, self.summary)
-        self.setData(3, Qt.DisplayRole, self.filename)
-        self.setData(4, Qt.DisplayRole, self.lineno or "")
+        self.setData(0, Qt.ItemDataRole.DisplayRole, "")
+        self.setData(1, Qt.ItemDataRole.DisplayRole, "")
+        self.setData(2, Qt.ItemDataRole.DisplayRole, self.summary)
+        self.setData(3, Qt.ItemDataRole.DisplayRole, self.filename)
+        self.setData(4, Qt.ItemDataRole.DisplayRole, self.lineno or "")
         
         if self.completed:
             self.setIcon(0, UI.PixmapCache.getIcon("taskCompleted"))
@@ -133,7 +133,7 @@
             self.setIcon(2, UI.PixmapCache.getIcon("empty"))
         
         self.colorizeTask()
-        self.setTextAlignment(4, Qt.AlignRight)
+        self.setTextAlignment(4, Qt.AlignmentFlag.AlignRight)
     
     def colorizeTask(self):
         """

eric ide

mercurial