]> git.sur5r.net Git - bacula/bacula/commitdiff
Tweak bat so drives are visable in content menu.
authorMarco van Wieringen <mvw@planets.elm.net>
Mon, 16 Jan 2012 18:06:42 +0000 (19:06 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:50:26 +0000 (14:50 +0200)
bacula/src/qt-console/storage/content.cpp

index e36c765324dc7cd35b8b6a512da5aee4c52e5d81..9794be0916abc2402cdc34fa25e628a038c17cbd 100644 (file)
@@ -261,7 +261,6 @@ void Content::populateContent()
       row++;
    }
 
-
    tableContent->verticalHeader()->hide();
    tableContent->sortByColumn(0, Qt::AscendingOrder);
    tableContent->setSortingEnabled(true);
@@ -276,11 +275,15 @@ void Content::populateContent()
 
    tableDrive->verticalHeader()->hide();
    QStringList drives = results_all.filter(QRegExp("^D\\|[0-9]+\\|"));
+   tableDrive->setRowCount(drives.size());
+
    row = 0;
    foreach (resultline, drives) {
       fieldlist = resultline.split("|");
-      if (fieldlist.size() < 4)
+      if (fieldlist.size() < 4) {
+         Pmsg1(0, "Discarding %s\n", resultline.data());
          continue; /* some fields missing, ignore row */
+      }
 
       int index=0;
       QStringListIterator fld(fieldlist);