Remove all rows in the table widget

`clearContents()` will leave the number of rows as is. This was causing
a segfault when trying to loop over the items of the widget.

Signed-off-by: Samir Benmendil <me@rmz.io>
This commit is contained in:
Samir Benmendil 2019-08-13 23:50:18 +01:00
parent 4a2b91a043
commit e44a2302de

View file

@ -110,7 +110,7 @@ void IgnoreListEditor::slotRemoveCurrentItem()
void IgnoreListEditor::slotRemoveAllItems()
{
ui->tableWidget->clearContents();
ui->tableWidget->setRowCount(0);
if (qobject_cast<GeneralSettings *>(parent()))
setupTableReadOnlyItems();
}