10 |
10 |
11 import os |
11 import os |
12 |
12 |
13 from PyQt5.QtCore import QProcess, Qt, QSize |
13 from PyQt5.QtCore import QProcess, Qt, QSize |
14 from PyQt5.QtGui import QTextCursor, QBrush |
14 from PyQt5.QtGui import QTextCursor, QBrush |
15 from PyQt5.QtWidgets import QAction, QToolBar, QPlainTextEdit, QSpinBox, \ |
15 from PyQt5.QtWidgets import ( |
16 QComboBox |
16 QAction, QToolBar, QPlainTextEdit, QSpinBox, QComboBox |
|
17 ) |
17 |
18 |
18 from E5Gui.E5Application import e5App |
19 from E5Gui.E5Application import e5App |
19 from E5Gui import E5MessageBox |
20 from E5Gui import E5MessageBox |
20 from E5Gui.E5MainWindow import E5MainWindow |
21 from E5Gui.E5MainWindow import E5MainWindow |
21 |
22 |
146 |
147 |
147 def __stopServer(self): |
148 def __stopServer(self): |
148 """ |
149 """ |
149 Private slot to stop the Mercurial server. |
150 Private slot to stop the Mercurial server. |
150 """ |
151 """ |
151 if self.process is not None and \ |
152 if ( |
152 self.process.state() != QProcess.NotRunning: |
153 self.process is not None and |
|
154 self.process.state() != QProcess.NotRunning |
|
155 ): |
153 self.process.terminate() |
156 self.process.terminate() |
154 self.process.waitForFinished(5000) |
157 self.process.waitForFinished(5000) |
155 if self.process.state() != QProcess.NotRunning: |
158 if self.process.state() != QProcess.NotRunning: |
156 self.process.kill() |
159 self.process.kill() |
157 |
160 |