From 12a7429688f7eadb7fa2ccb5b8845a2c12a62cb0 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 17 Apr 2008 16:55:40 +0000 Subject: [PATCH] kes Fix bat seg fault at termination. kes Add Bacula generated version to bat about box. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6838 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/console/console.cpp | 10 ++++++---- bacula/src/qt-console/mainwin.cpp | 13 +++++++------ bacula/technotes-2.3 | 4 ++++ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/bacula/src/qt-console/console/console.cpp b/bacula/src/qt-console/console/console.cpp index f3e3ae4577..77106b2bb8 100644 --- a/bacula/src/qt-console/console/console.cpp +++ b/bacula/src/qt-console/console/console.cpp @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2007-2008 Free Software Foundation Europe e.V. + Copyright (C) 2007-2007 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -103,9 +103,11 @@ void Console::poll_messages() void Console::terminate() { if (m_sock) { - notify(false); - delete m_notifier; - m_notifier = NULL; + if (m_notifier) { + m_notifier->setEnabled(false); + delete m_notifier; + m_notifier = NULL; + } stopTimer(); m_sock->close(); m_sock = NULL; diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index 0e65eb8c06..fa5870fde5 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -36,6 +36,7 @@ */ #include "bat.h" +#include "version.h" #include "joblist/joblist.h" #include "storage/storage.h" #include "fileset/fileset.h" @@ -253,11 +254,6 @@ void MainWin::closeEvent(QCloseEvent *event) { m_isClosing = true; writeSettings(); - /* - * Close the console pages before non-console pages so that - * the notifier is turned off. Otherwise it prints an error when - * the page it is using gets destroyed. - */ foreach(Console *console, m_consoleHash){ console->writeSettings(); console->terminate(); @@ -275,6 +271,11 @@ void MainWin::closeEvent(QCloseEvent *event) } } } + foreach(Console *console, m_consoleHash){ + console->writeSettings(); + console->terminate(); + console->closeStackPage(); + } event->accept(); } @@ -490,7 +491,7 @@ void MainWin::input_line() void MainWin::about() { QMessageBox::about(this, tr("About bat"), - tr("

bat 1.0, by Dirk H Bartley and Kern Sibbald

" + tr("

bat " VERSION "(" BDATE "), by Dirk H Bartley and Kern Sibbald

" "

Copyright © 2007-" BYEAR " Free Software Foundation Europe e.V." "

The bat is an administrative console" " interface to the Director.")); diff --git a/bacula/technotes-2.3 b/bacula/technotes-2.3 index 6940c2f8d8..12dcd636e6 100644 --- a/bacula/technotes-2.3 +++ b/bacula/technotes-2.3 @@ -24,6 +24,10 @@ Add long term statistics job table General: +17Apr08 +kes Fix bat seg fault at termination. +kes Add Bacula generated version to bat about box. + 16Apr08 kes Experiment with allowing multiple read jobs. kes Move final volume swapping code to DCR method and -- 2.39.5