From: Kern Sibbald Date: Sun, 14 Feb 2010 17:23:56 +0000 (+0100) Subject: Tweak bat debug code X-Git-Tag: Release-5.0.1~70 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=97a35fc63628013a1a356351374234df10c9c1bd;p=bacula%2Fbacula Tweak bat debug code --- diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index ff92afaf26..6bb7519e59 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -312,8 +312,7 @@ void MainWin::waitEnter() return; } m_waitState = true; - if (mainWin->m_connDebug) - Pmsg0(000, "Entering Wait State\n"); + if (mainWin->m_connDebug) Pmsg0(000, "Entering Wait State\n"); app->setOverrideCursor(QCursor(Qt::WaitCursor)); disconnectSignals(); disconnectConsoleSignals(m_currentConsole); @@ -583,6 +582,7 @@ void MainWin::statusPageButtonClicked() void MainWin::restoreButtonClicked() { new prerestorePage(); + if (mainWin->m_miscDebug) Pmsg0(000, "in restoreButtonClicked after prerestorePage\n"); } void MainWin::jobPlotButtonClicked() diff --git a/bacula/src/qt-console/restore/prerestore.cpp b/bacula/src/qt-console/restore/prerestore.cpp index ef7baf5881..d09469d84f 100644 --- a/bacula/src/qt-console/restore/prerestore.cpp +++ b/bacula/src/qt-console/restore/prerestore.cpp @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2007-2009 Free Software Foundation Europe e.V. + Copyright (C) 2007-2010 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. @@ -122,6 +122,7 @@ void prerestorePage::buildPage() dockPage(); setCurrent(); this->show(); + if (mainWin->m_miscDebug) Pmsg0(000, "Leave preRestore\n"); } @@ -168,6 +169,12 @@ void prerestorePage::okButtonPushed() if (mainWin->m_commandDebug) { Pmsg1(000, "preRestore command \'%s\'\n", cmd.toUtf8().data()); } + /* + * Send off command that looks something like: + * + * restore fileset="Full Set" client="timmy-fd" + * storage="File" current select + */ m_console->write_dir(m_conn, cmd.toUtf8().data()); /* Note, do not turn notifier back on here ... */ @@ -181,6 +188,7 @@ void prerestorePage::okButtonPushed() mainWin->resetFocus(); } m_console->notify(m_conn, true); + if (mainWin->m_miscDebug) Pmsg0(000, "preRestore OK pressed\n"); } @@ -252,9 +260,8 @@ int prerestorePage::jobdefsFromJob(QStringList &fieldlist, QString &jobId) } /* foreach resultline */ } /* if results from query */ - /* FIXME This should not be getting more than one ever */ - if(results.count() >= 1) return 1; - else return 0; + /* ***FIXME*** This should not ever be getting more than one */ + return results.count() >= 1; } /* @@ -353,8 +360,10 @@ void prerestorePage::jobRadioClicked(bool checked) selectJobRadio->setChecked(false); selectJobIdsRadio->setChecked(true); } - Dmsg2(200, "jobRadio=%d jobidsRadio=%d\n", selectJobRadio->isChecked(), + if (mainWin->m_miscDebug) { + Pmsg2(000, "jobRadio=%d jobidsRadio=%d\n", selectJobRadio->isChecked(), selectJobIdsRadio->isChecked()); + } } void prerestorePage::jobidsRadioClicked(bool checked) @@ -384,6 +393,8 @@ void prerestorePage::jobidsRadioClicked(bool checked) selectJobRadio->setChecked(true); selectJobIdsRadio->setChecked(false); } - Dmsg2(200, "jobRadio=%d jobidsRadio=%d\n", selectJobRadio->isChecked(), + if (mainWin->m_miscDebug) { + Pmsg2(000, "jobRadio=%d jobidsRadio=%d\n", selectJobRadio->isChecked(), selectJobIdsRadio->isChecked()); + } } diff --git a/bacula/src/qt-console/restore/restore.cpp b/bacula/src/qt-console/restore/restore.cpp index b820f6b642..28fa4e64f8 100644 --- a/bacula/src/qt-console/restore/restore.cpp +++ b/bacula/src/qt-console/restore/restore.cpp @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2007-2009 Free Software Foundation Europe e.V. + Copyright (C) 2007-2010 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. @@ -27,8 +27,6 @@ */ /* - * Version $Id$ - * * Restore Class * * Kern Sibbald, February MMVII @@ -89,6 +87,7 @@ restorePage::restorePage(int conn) dockPage(); setCurrent(); this->show(); + if (mainWin->m_miscDebug) Pmsg0(000, "Leave restorePage\n"); } restorePage::~restorePage()