X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fignorelistsettingspage.cpp;h=f2175be754a381ab078e857a74614006d15d7aa4;hp=4aca7d39ee4ab7d384011aa74bfc00176299eebf;hb=a6586b5f46fd062982111c0154f66216727cbc3a;hpb=b65b9f7615165e8700a44d59b7275a55558dd45b diff --git a/src/qtui/settingspages/ignorelistsettingspage.cpp b/src/qtui/settingspages/ignorelistsettingspage.cpp index 4aca7d39..f2175be7 100644 --- a/src/qtui/settingspages/ignorelistsettingspage.cpp +++ b/src/qtui/settingspages/ignorelistsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -21,7 +21,6 @@ #include "ignorelistsettingspage.h" #include -#include #include #include #include @@ -30,14 +29,18 @@ #include #include +#include "expressionmatch.h" + +#include "icon.h" + IgnoreListSettingsPage::IgnoreListSettingsPage(QWidget *parent) : SettingsPage(tr("IRC"), tr("Ignore List"), parent) { ui.setupUi(this); _delegate = new IgnoreListDelegate(ui.ignoreListView); - ui.newIgnoreRuleButton->setIcon(QIcon::fromTheme("list-add")); - ui.deleteIgnoreRuleButton->setIcon(QIcon::fromTheme("edit-delete")); - ui.editIgnoreRuleButton->setIcon(QIcon::fromTheme("configure")); + ui.newIgnoreRuleButton->setIcon(icon::get("list-add")); + ui.deleteIgnoreRuleButton->setIcon(icon::get("edit-delete")); + ui.editIgnoreRuleButton->setIcon(icon::get("configure")); ui.ignoreListView->setSelectionBehavior(QAbstractItemView::SelectRows); ui.ignoreListView->setSelectionMode(QAbstractItemView::SingleSelection); @@ -329,14 +332,9 @@ void IgnoreListEditDlg::widgetHasChanged() _clonedIgnoreListItem.scopeRule = QString(); } else { - QStringList text = ui.scopeRuleTextEdit->toPlainText().split(";", QString::SkipEmptyParts); - QStringList::iterator it = text.begin(); - while (it != text.end()) { - *it = it->trimmed(); - ++it; - } - - _clonedIgnoreListItem.scopeRule = text.join("; "); + // Trim the resulting MultiWildcard expression + _clonedIgnoreListItem.scopeRule = + ExpressionMatch::trimMultiWildcardWhitespace(ui.scopeRuleTextEdit->toPlainText()); } _clonedIgnoreListItem.ignoreRule = ui.ignoreRuleLineEdit->text();