QString fileset_comsep("");
bool first = true;
+ QStringList notFoundList = m_console->fileset_list;
foreach(QString filesetName, m_console->fileset_list) {
if (first) {
fileset_comsep += "'" + filesetName + "'";
fileset_comsep += ",'" + filesetName + "'";
}
+ int row = 0;
+ tableWidget->setRowCount(m_console->fileset_list.count());
if (fileset_comsep != "") {
/* Set up query QString and header QStringList */
QString query("");
Pmsg1(000, "FileSet query cmd : %s\n",query.toUtf8().data());
}
if (m_console->sql_cmd(query, results)) {
- int row = 0;
QStringList fieldlist;
- tableWidget->setRowCount(results.count());
/* Iterate through the record returned from the query */
foreach (QString resultline, results) {
fieldlist = resultline.split("\t");
+ /* remove this fileSet from notFoundList */
+ int indexOf = notFoundList.indexOf(fieldlist[0]);
+ if (indexOf != -1) { notFoundList.removeAt(indexOf); }
+
TableItemFormatter item(*tableWidget, row);
/* Iterate through fields in the record */
}
}
}
+ foreach(QString filesetName, notFoundList) {
+ TableItemFormatter item(*tableWidget, row);
+ item.setTextFld(0, filesetName);
+ row++;
+ }
+
/* set default sorting */
tableWidget->sortByColumn(headerlist.indexOf(tr("Create Time")), Qt::DescendingOrder);
tableWidget->setSortingEnabled(true);