From: Kern Sibbald Date: Thu, 29 Oct 2009 20:40:07 +0000 (+0100) Subject: Fix Restore dlg seg fault + minor cleanups in bat X-Git-Tag: Release-5.0.0~281^2~21 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b6fe42d45ab752b2d5d6e2ed5b6741717bb91b65;p=bacula%2Fbacula Fix Restore dlg seg fault + minor cleanups in bat --- diff --git a/bacula/src/qt-console/bcomm/dircomm.cpp b/bacula/src/qt-console/bcomm/dircomm.cpp index 86f97478b7..5a36583313 100644 --- a/bacula/src/qt-console/bcomm/dircomm.cpp +++ b/bacula/src/qt-console/bcomm/dircomm.cpp @@ -451,7 +451,9 @@ bool DirComm::notify(bool enable) bool prev_enabled = false; if (m_notifier) { prev_enabled = m_notifier->isEnabled(); - m_notifier->setEnabled(enable); + if (prev_enabled != enable) { + m_notifier->setEnabled(enable); + } if (mainWin->m_connDebug) { if (prev_enabled && !enable) Pmsg2(000, "m_notifier Disabling notifier: %i %s\n", m_conn, m_console->m_dir->name()); diff --git a/bacula/src/qt-console/jobgraphs/jobplot.cpp b/bacula/src/qt-console/jobgraphs/jobplot.cpp index 2fe38d5f28..f2b56735c1 100644 --- a/bacula/src/qt-console/jobgraphs/jobplot.cpp +++ b/bacula/src/qt-console/jobgraphs/jobplot.cpp @@ -135,7 +135,7 @@ void JobPlot::reGraph() void JobPlot::setupControls() { QStringList graphType = QStringList() << /* tr("Fitted") <<*/ tr("Sticks") - << tr("Lines") << tr("Steps") << tr("None"); + << tr("Lines") << tr("Steps") << tr("None"); controls->plotTypeCombo->addItems(graphType); fillSymbolCombo(controls->fileSymbolTypeCombo); @@ -219,7 +219,7 @@ void JobPlot::runQuery() int volumeIndex = controls->volumeComboBox->currentIndex(); if ((volumeIndex != -1) && (controls->volumeComboBox->itemText(volumeIndex) != tr("Any"))) { query += " LEFT OUTER JOIN JobMedia ON (JobMedia.JobId=Job.JobId)" - " LEFT OUTER JOIN Media ON (JobMedia.MediaId=Media.MediaId)"; + " LEFT OUTER JOIN Media ON (JobMedia.MediaId=Media.MediaId)"; conditions.append("Media.VolumeName='" + controls->volumeComboBox->itemText(volumeIndex) + "'"); } comboCond(conditions, controls->fileSetComboBox, "FileSet.FileSet"); @@ -571,6 +571,8 @@ void JobPlot::readSplitterSettings() { QSettings settings(m_console->m_dir->name(), "bat"); settings.beginGroup("JobPlot"); - if (settings.contains("m_splitterSizes")) { m_splitter->restoreState(settings.value("m_splitterSizes").toByteArray()); } + if (settings.contains("m_splitterSizes")) { + m_splitter->restoreState(settings.value("m_splitterSizes").toByteArray()); + } settings.endGroup(); } diff --git a/bacula/src/qt-console/make-win32 b/bacula/src/qt-console/make-win32 index a0683000a3..4b4ed4a27d 100755 --- a/bacula/src/qt-console/make-win32 +++ b/bacula/src/qt-console/make-win32 @@ -13,4 +13,6 @@ if test -e ../config.h.orig ; then fi if test -d ../win32/release32; then cp -f debug/bat.exe ../win32/release32 + cp -f ${DEPKGS}/depkgs-mingw32/lib/qt/QtGui4.dll ../win32/release32 + cp -f ${DEPKGS}/depkgs-mingw32/lib/qt/QtCore4.dll ../win32/release32 fi diff --git a/bacula/src/qt-console/restore/restore.cpp b/bacula/src/qt-console/restore/restore.cpp index 557a6d05b4..8f30997c93 100644 --- a/bacula/src/qt-console/restore/restore.cpp +++ b/bacula/src/qt-console/restore/restore.cpp @@ -491,7 +491,6 @@ void restorePage::writeSettings() { QSettings settings(m_console->m_dir->name(), "bat"); settings.beginGroup("RestorePage"); - m_splitText = "splitterSizes_2"; settings.setValue(m_splitText, splitter->saveState()); settings.endGroup(); } @@ -501,8 +500,11 @@ void restorePage::writeSettings() */ void restorePage::readSettings() { + m_splitText = "splitterSizes_2"; QSettings settings(m_console->m_dir->name(), "bat"); settings.beginGroup("RestorePage"); - if (settings.contains(m_splitText)) { splitter->restoreState(settings.value(m_splitText).toByteArray()); } + if (settings.contains(m_splitText)) { + splitter->restoreState(settings.value(m_splitText).toByteArray()); + } settings.endGroup(); } diff --git a/bacula/src/qt-console/status/clientstat.cpp b/bacula/src/qt-console/status/clientstat.cpp index 3a1ba5bd67..42d2fdba87 100644 --- a/bacula/src/qt-console/status/clientstat.cpp +++ b/bacula/src/qt-console/status/clientstat.cpp @@ -179,8 +179,8 @@ void ClientStat::populateTerminated() if (field == "OK") p_tableitem->setBackground(Qt::green); else - p_tableitem->setBackground(Qt::red); - } + p_tableitem->setBackground(Qt::red); + } terminatedTable->setItem(results.size() - row - 1, column, p_tableitem); column += 1; }