X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fcorehighlightsettingspage.cpp;h=242c3181d8ad370499aeb14124131c72563b83c6;hp=d8eaa9f9eb6365768eec9ff6dec8c7b8554c5bdc;hb=106526817f753cdd680c783fc58968d5111d16eb;hpb=d0bfecae4adc8fe1458103b35de71b5620952f0f diff --git a/src/qtui/settingspages/corehighlightsettingspage.cpp b/src/qtui/settingspages/corehighlightsettingspage.cpp index d8eaa9f9..242c3181 100644 --- a/src/qtui/settingspages/corehighlightsettingspage.cpp +++ b/src/qtui/settingspages/corehighlightsettingspage.cpp @@ -26,7 +26,7 @@ #include "qtui.h" CoreHighlightSettingsPage::CoreHighlightSettingsPage(QWidget *parent) - : SettingsPage(tr("Interface"), tr("Core-Side Highlights"), parent) + : SettingsPage(tr("Interface"), tr("Remote Highlights"), parent) { ui.setupUi(this); @@ -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(); } @@ -496,3 +500,7 @@ void CoreHighlightSettingsPage::importRules() { setChangedState(false); load(); } + +bool CoreHighlightSettingsPage::isSelectable() const { + return Client::isConnected() && Client::isCoreFeatureEnabled(Quassel::Feature::CoreSideHighlights); +}