7 Module implementing a dialog to show the output of the hg diff command process. |
7 Module implementing a dialog to show the output of the hg diff command process. |
8 """ |
8 """ |
9 |
9 |
10 |
10 |
11 from PyQt5.QtCore import pyqtSlot, QFileInfo, Qt |
11 from PyQt5.QtCore import pyqtSlot, QFileInfo, Qt |
12 from PyQt5.QtGui import QTextCursor, QCursor |
12 from PyQt5.QtGui import QTextCursor |
13 from PyQt5.QtWidgets import QWidget, QDialogButtonBox, QApplication |
13 from PyQt5.QtWidgets import QWidget, QDialogButtonBox |
14 |
14 |
15 from E5Gui import E5MessageBox, E5FileDialog |
15 from E5Gui import E5MessageBox, E5FileDialog |
16 from E5Gui.E5Application import e5App |
16 from E5Gui.E5Application import e5App |
17 |
17 |
18 from .Ui_HgDiffDialog import Ui_HgDiffDialog |
18 from .Ui_HgDiffDialog import Ui_HgDiffDialog |
93 self.setWindowTitle(self.tr("Patch Contents")) |
93 self.setWindowTitle(self.tr("Patch Contents")) |
94 |
94 |
95 self.raise_() |
95 self.raise_() |
96 self.activateWindow() |
96 self.activateWindow() |
97 |
97 |
98 QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) |
|
99 procStarted = self.__diffGenerator.start( |
98 procStarted = self.__diffGenerator.start( |
100 fn, versions=versions, bundle=bundle, qdiff=qdiff) |
99 fn, versions=versions, bundle=bundle, qdiff=qdiff) |
101 if not procStarted: |
100 if not procStarted: |
102 E5MessageBox.critical( |
101 E5MessageBox.critical( |
103 self, |
102 self, |
109 |
108 |
110 def __generatorFinished(self): |
109 def __generatorFinished(self): |
111 """ |
110 """ |
112 Private slot connected to the finished signal. |
111 Private slot connected to the finished signal. |
113 """ |
112 """ |
114 QApplication.restoreOverrideCursor() |
|
115 self.refreshButton.setEnabled(True) |
113 self.refreshButton.setEnabled(True) |
116 |
114 |
117 diff, errors, fileSeparators = self.__diffGenerator.getResult() |
115 diff, errors, fileSeparators = self.__diffGenerator.getResult() |
118 |
116 |
119 if diff: |
117 if diff: |