From e44a2302de26ce29d36633864295efb917f9ad99 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Tue, 13 Aug 2019 23:50:18 +0100 Subject: [PATCH] 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 --- src/gui/ignorelisteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/ignorelisteditor.cpp b/src/gui/ignorelisteditor.cpp index 6f8fa5e37..df8726a70 100644 --- a/src/gui/ignorelisteditor.cpp +++ b/src/gui/ignorelisteditor.cpp @@ -110,7 +110,7 @@ void IgnoreListEditor::slotRemoveCurrentItem() void IgnoreListEditor::slotRemoveAllItems() { - ui->tableWidget->clearContents(); + ui->tableWidget->setRowCount(0); if (qobject_cast(parent())) setupTableReadOnlyItems(); }