src/eric7/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py

branch
eric7
changeset 10068
7febcdccb2a1
parent 10050
3750abc45d5e
child 10069
435cc5875135
equal deleted inserted replaced
10067:e836591254ac 10068:7febcdccb2a1
494 ) 494 )
495 self.resultList.header().setStretchLastSection(True) 495 self.resultList.header().setStretchLastSection(True)
496 496
497 self.checkProgress.setVisible(False) 497 self.checkProgress.setVisible(False)
498 498
499 def __cancel(self):
500 """
501 Private method to cancel the current check run.
502 """
503 if self.__batch:
504 self.syntaxCheckService.cancelSyntaxBatchCheck()
505 QTimer.singleShot(1000, self.__finish)
506 else:
507 self.__finish()
508
509 def closeEvent(self, evt):
510 """
511 Protected method to handle a close event.
512
513 @param evt reference to the close event
514 @type QCloseEvent
515 """
516 self.__cancel()
517
499 def on_buttonBox_clicked(self, button): 518 def on_buttonBox_clicked(self, button):
500 """ 519 """
501 Private slot called by a button of the button box clicked. 520 Private slot called by a button of the button box clicked.
502 521
503 @param button button that was clicked 522 @param button button that was clicked
504 @type QAbstractButton 523 @type QAbstractButton
505 """ 524 """
506 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): 525 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close):
507 self.close() 526 self.close()
508 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): 527 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel):
509 if self.__batch: 528 self.__cancel()
510 self.syntaxCheckService.cancelSyntaxBatchCheck()
511 QTimer.singleShot(1000, self.__finish)
512 else:
513 self.__finish()
514 elif button == self.showButton: 529 elif button == self.showButton:
515 self.on_showButton_clicked() 530 self.on_showButton_clicked()
516 531
517 @pyqtSlot() 532 @pyqtSlot()
518 def on_startButton_clicked(self): 533 def on_startButton_clicked(self):

eric ide

mercurial