]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/console/console.cpp
The records filled with '*None*' are still there. This is a temporary fix.
[bacula/bacula] / bacula / src / qt-console / console / console.cpp
index ae9da662de6e16eca5bceed5eb2ce2bce08b7724..7e4cd706521667c3855f3fc8fe31827b33c6bc47 100644 (file)
@@ -48,7 +48,6 @@ m_notifier(NULL),
 m_api_set(false)
 {
    QFont font;
-   Pmsg0(000, "initializing m_messages_pending to false\n");
    m_messages_pending = false;
    m_parent = parent;
    m_closeable = false;
@@ -324,12 +323,20 @@ bool Console::sql_cmd(const char *query, QStringList &results)
    pm_strcat(cmd, "\"");
    write(cmd.c_str());
    while ((stat = read()) > 0) {
+      bool first = true;
       if (mainWin->m_displayAll) {
          display_text(msg());
          display_text("\n");
       }
       strip_trailing_junk(msg());
-      results << msg();
+      bool doappend = true;
+      if (first) {
+         QString dum = msg();
+         if ((dum.left(6) == "*None*")) doappend = false;
+      }
+      if (doappend)
+         results << msg();
+      first = false;
    }
    notify(true);
    discardToPrompt();