X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fqt-console%2Fmainwin.cpp;h=079c2a2f7a6baa6e401832048330013a74a7bdd9;hb=9c5f7fbcb9ccf23876bae25dee36a5a9a3cdd99f;hp=92cc016051a4b85519d778d42d199a6372caa195;hpb=c1bed1760da7956b0be6530e7362bacf108dd008;p=bacula%2Fbacula diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index 92cc016051..079c2a2f7a 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -247,6 +247,16 @@ 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(); + console->closeStackPage(); + } /* close all non console pages, this will call settings in destructors */ while (m_consoleHash.count() < m_pagehash.count()) { foreach(Pages *page, m_pagehash) { @@ -259,12 +269,6 @@ void MainWin::closeEvent(QCloseEvent *event) } } } - /* close the console pages and terminate connection */ - foreach(Console *console, m_consoleHash){ - console->writeSettings(); - console->terminate(); - console->closeStackPage(); - } event->accept(); }