13 from PyQt6.QtWidgets import ( |
13 from PyQt6.QtWidgets import ( |
14 QWidget, QDialogButtonBox, QTreeWidgetItem, QAbstractButton, QMenu, |
14 QWidget, QDialogButtonBox, QTreeWidgetItem, QAbstractButton, QMenu, |
15 QHeaderView, QApplication, QLineEdit |
15 QHeaderView, QApplication, QLineEdit |
16 ) |
16 ) |
17 |
17 |
18 from E5Gui import E5MessageBox |
18 from E5Gui import EricMessageBox |
19 from E5Gui.E5OverrideCursor import E5OverrideCursorProcess |
19 from E5Gui.EricOverrideCursor import EricOverrideCursorProcess |
20 |
20 |
21 from .Ui_GitStashBrowserDialog import Ui_GitStashBrowserDialog |
21 from .Ui_GitStashBrowserDialog import Ui_GitStashBrowserDialog |
22 |
22 |
23 import Preferences |
23 import Preferences |
24 from Globals import strToQByteArray |
24 from Globals import strToQByteArray |
69 self.vcs = vcs |
69 self.vcs = vcs |
70 self.__resetUI() |
70 self.__resetUI() |
71 |
71 |
72 self.__ioEncoding = Preferences.getSystem("IOEncoding") |
72 self.__ioEncoding = Preferences.getSystem("IOEncoding") |
73 |
73 |
74 self.__process = E5OverrideCursorProcess() |
74 self.__process = EricOverrideCursorProcess() |
75 self.__process.finished.connect(self.__procFinished) |
75 self.__process.finished.connect(self.__procFinished) |
76 self.__process.readyReadStandardOutput.connect(self.__readStdout) |
76 self.__process.readyReadStandardOutput.connect(self.__readStdout) |
77 self.__process.readyReadStandardError.connect(self.__readStderr) |
77 self.__process.readyReadStandardError.connect(self.__readStderr) |
78 |
78 |
79 self.__contextMenu = QMenu() |
79 self.__contextMenu = QMenu() |
178 self.__process.start('git', args) |
178 self.__process.start('git', args) |
179 procStarted = self.__process.waitForStarted(5000) |
179 procStarted = self.__process.waitForStarted(5000) |
180 if not procStarted: |
180 if not procStarted: |
181 self.inputGroup.setEnabled(False) |
181 self.inputGroup.setEnabled(False) |
182 self.inputGroup.hide() |
182 self.inputGroup.hide() |
183 E5MessageBox.critical( |
183 EricMessageBox.critical( |
184 self, |
184 self, |
185 self.tr('Process Generation Error'), |
185 self.tr('Process Generation Error'), |
186 self.tr( |
186 self.tr( |
187 'The process {0} could not be started. ' |
187 'The process {0} could not be started. ' |
188 'Ensure, that it is in the search path.' |
188 'Ensure, that it is in the search path.' |