1. TortoiseHg
  2. TortoiseHg
  3. thg


Yuya Nishihara  committed 078a030

repomodel: add workaround to flag HasDecoration if labels exist (CentOs 6.3)

Due to bug of PyQt < 4.7.1, there's no way to set HasDecoration correctly by


  • Participants
  • Parent commits 20b1973
  • Branches default

Comments (0)

Files changed (1)

File tortoisehg/hgqt/repomodel.py

View file
  • Ignore whitespace
                 return QColor(HIDDENREV_COLOR)
         if role == GraphNodeRole:
             return gnode
+        if (PYQT_VERSION < 0x40701 and role == Qt.DecorationRole
+            and (LabelsRole, index.column()) in self._cacheindexmap
+            and self.safedata(index, LabelsRole).toPyObject()):
+            # hack to flag HasDecoration where extended attributes of
+            # QStyleOptionViewItem are not accessible in initStyleOption()
+            return QColor(Qt.transparent)
         if (role, index.column()) not in self._cacheindexmap:
             return nullvariant
         # repo may be changed while reading in case of postpull=rebase for