eric6/Plugins/VcsPlugins/vcsMercurial/HgServeDialog.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8218
7c09585bd960
equal deleted inserted replaced
8141:27f636beebad 8143:2c730d5fd177
91 self.__serverToolbar.addWidget(self.__styleCombo) 91 self.__serverToolbar.addWidget(self.__styleCombo)
92 92
93 self.__browserToolbar = QToolBar(self.tr("Browser"), self) 93 self.__browserToolbar = QToolBar(self.tr("Browser"), self)
94 self.__browserToolbar.addAction(self.__browserAct) 94 self.__browserToolbar.addAction(self.__browserAct)
95 95
96 self.addToolBar(Qt.TopToolBarArea, self.__serverToolbar) 96 self.addToolBar(Qt.ToolBarArea.TopToolBarArea, self.__serverToolbar)
97 self.addToolBar(Qt.TopToolBarArea, self.__browserToolbar) 97 self.addToolBar(Qt.ToolBarArea.TopToolBarArea, self.__browserToolbar)
98 98
99 self.__log = QPlainTextEdit(self) 99 self.__log = QPlainTextEdit(self)
100 self.setCentralWidget(self.__log) 100 self.setCentralWidget(self.__log)
101 101
102 # polish up the dialog 102 # polish up the dialog
156 """ 156 """
157 Private slot to stop the Mercurial server. 157 Private slot to stop the Mercurial server.
158 """ 158 """
159 if ( 159 if (
160 self.process is not None and 160 self.process is not None and
161 self.process.state() != QProcess.NotRunning 161 self.process.state() != QProcess.ProcessState.NotRunning
162 ): 162 ):
163 self.process.terminate() 163 self.process.terminate()
164 self.process.waitForFinished(5000) 164 self.process.waitForFinished(5000)
165 if self.process.state() != QProcess.NotRunning: 165 if self.process.state() != QProcess.ProcessState.NotRunning:
166 self.process.kill() 166 self.process.kill()
167 167
168 self.__startAct.setEnabled(True) 168 self.__startAct.setEnabled(True)
169 self.__stopAct.setEnabled(False) 169 self.__stopAct.setEnabled(False)
170 self.__browserAct.setEnabled(False) 170 self.__browserAct.setEnabled(False)
229 @type str 229 @type str
230 @param error flag indicating to insert error text 230 @param error flag indicating to insert error text
231 @type bool 231 @type bool
232 """ 232 """
233 tc = self.__log.textCursor() 233 tc = self.__log.textCursor()
234 tc.movePosition(QTextCursor.End) 234 tc.movePosition(QTextCursor.MoveOperation.End)
235 self.__log.setTextCursor(tc) 235 self.__log.setTextCursor(tc)
236 if error: 236 if error:
237 self.__log.setCurrentCharFormat(self.cErrorFormat) 237 self.__log.setCurrentCharFormat(self.cErrorFormat)
238 else: 238 else:
239 self.__log.setCurrentCharFormat(self.cNormalFormat) 239 self.__log.setCurrentCharFormat(self.cNormalFormat)

eric ide

mercurial