1. Yuya Nishihara
  2. thg-qt-mq

Source

thg-qt-mq / filepathrole.diff

# HG changeset patch
# Parent f9c94ac978ff37bece1cc0393d845a30d75a8668
diff --git a/tortoisehg/hgqt/manifestmodel.py b/tortoisehg/hgqt/manifestmodel.py
--- a/tortoisehg/hgqt/manifestmodel.py
+++ b/tortoisehg/hgqt/manifestmodel.py
@@ -26,6 +26,8 @@ class ManifestModel(QAbstractItemModel):
 
     StatusRole = Qt.UserRole + 1
     """Role for file change status"""
+    FilePathRole = Qt.UserRole + 2
+    """Role for file path"""
 
     def __init__(self, repo, rev=None, statusfilter='MASC', parent=None):
         QAbstractItemModel.__init__(self, parent)
@@ -45,6 +47,8 @@ class ManifestModel(QAbstractItemModel):
             return self.fileIcon(index)
         if role == self.StatusRole:
             return self.fileStatus(index)
+        if role == self.FilePathRole:
+            return self.filePath(index)
 
         e = index.internalPointer()
         if role in (Qt.DisplayRole, Qt.EditRole):