mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-21 06:41:00 +00:00
Remove registered log handler when the main window closes.
This commit is contained in:
parent
3305e5c92c
commit
cb724616c0
1 changed files with 4 additions and 2 deletions
|
|
@ -164,6 +164,8 @@ class LinkCheckerMain (QtGui.QMainWindow, Ui_MainWindow):
|
|||
settings.sync()
|
||||
if e is not None:
|
||||
e.accept()
|
||||
# remove registered logging handler
|
||||
self.config.remove_loghandler(self.handler)
|
||||
|
||||
@QtCore.pyqtSignature("")
|
||||
def on_actionAbout_triggered (self):
|
||||
|
|
@ -227,10 +229,10 @@ Version 2 or later.</p>
|
|||
self.config = configuration.Configuration()
|
||||
self.config.logger_add("gui", GuiLogger)
|
||||
self.config["logger"] = self.config.logger_new('gui', widget=self.checker)
|
||||
handler = GuiLogHandler(self.debug)
|
||||
self.handler = GuiLogHandler(self.debug)
|
||||
self.config["status"] = True
|
||||
self.config["status_wait_seconds"] = 1
|
||||
self.config.init_logging(StatusLogger(self.progress), handler=handler)
|
||||
self.config.init_logging(StatusLogger(self.progress), handler=self.handler)
|
||||
|
||||
def set_config (self):
|
||||
"""Set configuration."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue