From 7fd24120586f0578618f93013111629f1f412d84 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 13 May 2008 07:54:14 +0000 Subject: [PATCH] Tweak JobLog display git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6964 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/joblog/joblog.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/bacula/src/qt-console/joblog/joblog.cpp b/bacula/src/qt-console/joblog/joblog.cpp index 065367d887..7756d0b012 100644 --- a/bacula/src/qt-console/joblog/joblog.cpp +++ b/bacula/src/qt-console/joblog/joblog.cpp @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2007 Free Software Foundation Europe e.V. + Copyright (C) 2007-2008 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. @@ -77,14 +77,14 @@ void JobLog::getFont() void JobLog::populateText() { QString heading("Log records for job "); - heading += m_jobId + "\n"; + heading += m_jobId + "
\n"; textEdit->insertHtml(heading); if (!m_console->preventInUseConnect()) return; QString query(""); - query = "SELECT Time, LogText FROM Log WHERE JobId='" + m_jobId + "'"; + query = "SELECT Time,LogText FROM Log WHERE JobId='" + m_jobId + "' ORDER by Time"; QStringList results; if (m_console->sql_cmd(query, results)) { @@ -94,22 +94,21 @@ void JobLog::populateText() /* Iterate through the lines of results. */ foreach (QString resultline, results) { - fieldlist = resultline.split("\t"); - int column = 0; + fieldlist = resultline.split("\t"); /* Iterate through fields in the record */ foreach (field, fieldlist) { display_text(field); - if (column <= 1) display_text("\n"); - column += 1; + if (column == 0) display_text(" "); + column++; } /* foreach field */ - resultcount += 1; + resultcount++; } /* foreach resultline */ if (resultcount == 0) { /* show a message about configuration item */ - QMessageBox::warning(this, tr("Bat"), - tr("There were no results ?? !!!.\n" -"It is possible you may need to add \"catalog = all\" to the Messages stanza" + QMessageBox::warning(this, "Bat", + tr("There were no results!\n" +"It is possible you may need to add \"catalog = all\" to the Messages resource" " for this job.\n"), QMessageBox::Ok); } } /* if results from query */ -- 2.39.5