7 Module implementing the virtualenv execution dialog. |
7 Module implementing the virtualenv execution dialog. |
8 """ |
8 """ |
9 |
9 |
10 import os |
10 import os |
11 |
11 |
12 from PyQt6.QtCore import QProcess, QTimer, QUrl |
12 from PyQt6.QtCore import QProcess, QTimer, QUrl, pyqtSlot |
13 from PyQt6.QtGui import QDesktopServices |
13 from PyQt6.QtGui import QDesktopServices |
14 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
14 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
15 |
15 |
16 from eric7 import Preferences |
16 from eric7 import Preferences |
17 from eric7.SystemUtilities import OSUtilities, PythonUtilities |
17 from eric7.SystemUtilities import OSUtilities, PythonUtilities |
121 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
121 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
122 self.accept() |
122 self.accept() |
123 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
123 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
124 self.__finish(0, 0, giveUp=True) |
124 self.__finish(0, 0, giveUp=True) |
125 |
125 |
|
126 @pyqtSlot(int, QProcess.ExitStatus) |
126 def __finish(self, exitCode, exitStatus, giveUp=False): |
127 def __finish(self, exitCode, exitStatus, giveUp=False): |
127 """ |
128 """ |
128 Private slot called when the process finished. |
129 Private slot called when the process finished. |
129 |
130 |
130 It is called when the process finished or |
131 It is called when the process finished or the user pressed the button. |
131 the user pressed the button. |
|
132 |
132 |
133 @param exitCode exit code of the process (integer) |
133 @param exitCode exit code of the process (integer) |
134 @param exitStatus exit status of the process (QProcess.ExitStatus) |
134 @param exitStatus exit status of the process (QProcess.ExitStatus) |
135 @param giveUp flag indicating to not start another attempt (boolean) |
135 @param giveUp flag indicating to not start another attempt (boolean) |
136 """ |
136 """ |