Commits

Kimmo Varis  committed 72297dc

Have header (column) names in only one module.

  • Participants
  • Parent commits c5587f3

Comments (0)

Files changed (1)

File src/resultstreemodel.py

 import error
 import resultstreeitem
 
-RESULT_HEADERS = ('Filename', 'Line', 'Severity', 'Summary')
-
 class TreeModel(QtCore.QAbstractItemModel):
     '''
     a model to display a few names, ordered by sex
         if parent and parent.isValid():
             return parent.internalPointer().columnCount()
         else:
-            return len(RESULT_HEADERS)
+            return len(resultstreeitem.RESULT_HEADERS)
 
     def data(self, index, role):
         if not index.isValid():
         if (orientation == QtCore.Qt.Horizontal and
                 role == QtCore.Qt.DisplayRole):
             try:
-                return RESULT_HEADERS[column]
+                return resultstreeitem.RESULT_HEADERS[column]
             except IndexError:
                 pass