Commits

Yuya Nishihara  committed a90d30c

reporegistry, repoview: use lightweight comparison for PYQT_VERSION

The doc says PYQT_VERSION and QT_VERSION are hexadecimal integer in
0xMMNNPP (M: major, N: minor, P: patch) format.

  • Participants
  • Parent commits 3762eb2
  • Branches stable

Comments (0)

Files changed (3)

File tortoisehg/hgqt/reporegistry.py

         self.setAcceptDrops(True)
         self.setAutoScroll(True)
         self.setDragDropMode(QAbstractItemView.DragDrop)
-        if PYQT_VERSION_STR.split('.') >= ['4', '7']:
+        if PYQT_VERSION >= 0x40700:
             self.setDefaultDropAction(Qt.MoveAction)
         self.setDropIndicatorShown(True)
         self.setEditTriggers(QAbstractItemView.DoubleClicked

File tortoisehg/hgqt/repotreemodel.py

     xw.writeEndDocument()
 
 def readXml(source, rootElementName):
-    if PYQT_VERSION_STR.split('.') < ['4', '7']:
+    if PYQT_VERSION < 0x40700:
         return
     itemread = None
     xr = QXmlStreamReader(source)

File tortoisehg/hgqt/repoview.py

         self.htmlDelegate = htmldelegate.HTMLDelegate(self)
 
         self.setAcceptDrops(True)
-        if PYQT_VERSION_STR.split('.') >= ['4', '7']:
+        if PYQT_VERSION >= 0x40700:
             self.setDefaultDropAction(Qt.MoveAction)
         self.setDragEnabled(True)
         self.setDropIndicatorShown(True)