From 6d1c476bd3d5c394710cfb7035679fd6d069151e Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Sun, 22 Mar 2009 20:17:23 +0000 Subject: [PATCH] OOps. prevent a segfault when setting table widget items to read only. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8582 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/fileset/fileset.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bacula/src/qt-console/fileset/fileset.cpp b/bacula/src/qt-console/fileset/fileset.cpp index 30d90a9e2f..7f0eb899ac 100644 --- a/bacula/src/qt-console/fileset/fileset.cpp +++ b/bacula/src/qt-console/fileset/fileset.cpp @@ -85,7 +85,6 @@ void FileSet::populateTable() tableWidget->setColumnCount(headerlist.count()); tableWidget->setHorizontalHeaderLabels(headerlist); tableWidget->horizontalHeader()->setHighlightSections(false); - tableWidget->setRowCount(m_console->fileset_list.count()); tableWidget->verticalHeader()->hide(); tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); tableWidget->setSelectionMode(QAbstractItemView::SingleSelection); @@ -118,6 +117,7 @@ void FileSet::populateTable() 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) { -- 2.39.5