Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py

changeset 5736
000ea446ff4b
parent 5624
cdd346d8858b
child 5765
39d8b26ff557
equal deleted inserted replaced
5735:f606dbe20be6 5736:000ea446ff4b
14 except NameError: 14 except NameError:
15 pass 15 pass
16 16
17 import os 17 import os
18 18
19 from PyQt5.QtCore import pyqtSlot, qVersion, Qt, QProcess, QTimer, QSize 19 from PyQt5.QtCore import pyqtSlot, Qt, QProcess, QTimer, QSize
20 from PyQt5.QtGui import QTextCursor, QCursor 20 from PyQt5.QtGui import QTextCursor, QCursor
21 from PyQt5.QtWidgets import QWidget, QDialogButtonBox, QMenu, QHeaderView, \ 21 from PyQt5.QtWidgets import QWidget, QDialogButtonBox, QMenu, QHeaderView, \
22 QTreeWidgetItem, QLineEdit, QToolTip 22 QTreeWidgetItem, QLineEdit, QToolTip
23 23
24 from E5Gui.E5Application import e5App 24 from E5Gui.E5Application import e5App
29 from .HgDiffHighlighter import HgDiffHighlighter 29 from .HgDiffHighlighter import HgDiffHighlighter
30 from .HgDiffGenerator import HgDiffGenerator 30 from .HgDiffGenerator import HgDiffGenerator
31 31
32 import Preferences 32 import Preferences
33 import UI.PixmapCache 33 import UI.PixmapCache
34 from Globals import qVersionTuple
34 35
35 36
36 class HgStatusDialog(QWidget, Ui_HgStatusDialog): 37 class HgStatusDialog(QWidget, Ui_HgStatusDialog):
37 """ 38 """
38 Class implementing a dialog to show the output of the hg status command 39 Class implementing a dialog to show the output of the hg status command
127 """ 128 """
128 Private method to initialize the actions menu. 129 Private method to initialize the actions menu.
129 """ 130 """
130 self.__actionsMenu = QMenu() 131 self.__actionsMenu = QMenu()
131 self.__actionsMenu.setTearOffEnabled(True) 132 self.__actionsMenu.setTearOffEnabled(True)
132 if qVersion() >= "5.1.0": 133 if qVersionTuple() >= (5, 1, 0):
133 self.__actionsMenu.setToolTipsVisible(True) 134 self.__actionsMenu.setToolTipsVisible(True)
134 else: 135 else:
135 self.__actionsMenu.hovered.connect(self.__actionsMenuHovered) 136 self.__actionsMenu.hovered.connect(self.__actionsMenuHovered)
136 self.__actionsMenu.aboutToShow.connect(self.__showActionsMenu) 137 self.__actionsMenu.aboutToShow.connect(self.__showActionsMenu)
137 138

eric ide

mercurial