X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fignorelistmanager.h;h=72ca0af9b39a6a1c614a3a74893cf063b71dcf45;hp=d875cc4f05f4def554f843b2739cbec5b3e4b1e1;hb=8677a82a6664da67c67610d0b438ee17904b12fb;hpb=694f9bfbf7f1af19108461c7e00d133e55082bce diff --git a/src/common/ignorelistmanager.h b/src/common/ignorelistmanager.h index d875cc4f..72ca0af9 100644 --- a/src/common/ignorelistmanager.h +++ b/src/common/ignorelistmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-09 by the Quassel Project * + * Copyright (C) 2005-2014 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,13 +15,14 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef IGNORELISTMANAGER_H #define IGNORELISTMANAGER_H #include +#include #include "message.h" #include "syncableobject.h" @@ -60,10 +61,16 @@ public: ScopeType scope; QString scopeRule; bool isActive; + QRegExp regEx; IgnoreListItem() {} IgnoreListItem(IgnoreType type_, const QString &ignoreRule_, bool isRegEx_, StrictnessType strictness_, ScopeType scope_, const QString &scopeRule_, bool isActive_) - : type(type_), ignoreRule(ignoreRule_), isRegEx(isRegEx_), strictness(strictness_), scope(scope_), scopeRule(scopeRule_), isActive(isActive_) {} + : type(type_), ignoreRule(ignoreRule_), isRegEx(isRegEx_), strictness(strictness_), scope(scope_), scopeRule(scopeRule_), isActive(isActive_), regEx(ignoreRule_) { + regEx.setCaseSensitivity(Qt::CaseInsensitive); + if (!isRegEx_) { + regEx.setPatternSyntax(QRegExp::Wildcard); + } + } bool operator!=(const IgnoreListItem &other) { return (type != other.type ||