Tasks/TaskViewer.py

branch
5_2_x
changeset 1642
906cd3ed0e6a
parent 1509
c0b5e693b0eb
child 1653
fed1920ff53b
child 2002
a26d00f60104
--- a/Tasks/TaskViewer.py	Sun Feb 19 15:28:21 2012 +0100
+++ b/Tasks/TaskViewer.py	Sun Feb 19 15:26:55 2012 +0100
@@ -54,6 +54,8 @@
         @param project reference to the project object (Project)
         @param longtext explanatory text of the task (string)
         """
+        super().__init__()
+        
         self.description = description
         self.longtext = longtext
         if priority in [0, 1, 2]:
@@ -71,8 +73,11 @@
         if isProjectTask:
             self.filename = self.project.getRelativePath(self.filename)
             
-        super().__init__(["", "", self.description, self.filename,
-            (self.lineno and "{0:6d}".format(self.lineno) or "")])
+        self.setData(0, Qt.DisplayRole, "")
+        self.setData(1, Qt.DisplayRole, "")
+        self.setData(2, Qt.DisplayRole, self.description)
+        self.setData(3, Qt.DisplayRole, self.filename)
+        self.setData(4, Qt.DisplayRole, self.lineno or "")
         
         if self.completed:
             self.setIcon(0, UI.PixmapCache.getIcon("taskCompleted.png"))

eric ide

mercurial