From: Janne Koschinski Date: Thu, 21 Dec 2017 22:48:03 +0000 (+0100) Subject: Fix an issue where empty elements were shown in the highlight list X-Git-Tag: travis-deploy-test~156 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=106526817f753cdd680c783fc58968d5111d16eb;hp=12028f7dfb31ebf5694f5dae95bfc31bcde83b43 Fix an issue where empty elements were shown in the highlight list - Replace clearContents with while (rowCount()) removeRow --- diff --git a/src/qtui/settingspages/corehighlightsettingspage.cpp b/src/qtui/settingspages/corehighlightsettingspage.cpp index 3a6d6eb0..242c3181 100644 --- a/src/qtui/settingspages/corehighlightsettingspage.cpp +++ b/src/qtui/settingspages/corehighlightsettingspage.cpp @@ -308,7 +308,9 @@ void CoreHighlightSettingsPage::emptyHighlightTable() if (ui.highlightTable->rowCount() != highlightList.size()) { qDebug() << "something is wrong: ui.highlight and highlightList don't have the same size!"; } - ui.highlightTable->clearContents(); + while (ui.highlightTable->rowCount()) { + ui.highlightTable->removeRow(0); + } highlightList.clear(); } @@ -318,7 +320,9 @@ void CoreHighlightSettingsPage::emptyIgnoredTable() if (ui.ignoredTable->rowCount() != ignoredList.size()) { qDebug() << "something is wrong: ui.highlight and highlightList don't have the same size!"; } - ui.ignoredTable->clearContents(); + while (ui.ignoredTable->rowCount()) { + ui.ignoredTable->removeRow(0); + } ignoredList.clear(); }