X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fexpressionmatch.h;h=271277865e715f064e46c0e39ee4aeeb5c844eb7;hp=0f5acfcfb3f1b5cadc8c330293e1924608c898ae;hb=ab7ef4d24f62b5848b628482b7762ebfc0b53e1a;hpb=c55df5f2d765b100b7a1ead5a72202f969aa9581;ds=sidebyside diff --git a/src/common/expressionmatch.h b/src/common/expressionmatch.h index 0f5acfcf..27127786 100644 --- a/src/common/expressionmatch.h +++ b/src/common/expressionmatch.h @@ -20,15 +20,10 @@ #pragma once +#include #include #include -#if QT_VERSION >= 0x050000 -#include -#else -#include -#endif - /** * Expression matcher with multiple modes of operation and automatic caching for performance */ @@ -37,11 +32,7 @@ class ExpressionMatch public: /// Expression matching mode -#if QT_VERSION >= 0x050000 enum class MatchMode { -#else - enum MatchMode { -#endif MatchPhrase, ///< Match phrase as specified, no special handling MatchMultiPhrase, ///< Match phrase as specified, split on \n only MatchWildcard, ///< Match wildcards, "!" at start inverts, "\" escapes @@ -189,13 +180,9 @@ private: * * @param regExString Regular expression string * @param caseSensitive If true, match case-sensitively, otherwise ignore case when matching - * @return Configured QRegExp class on Qt 4, QRegularExpression on Qt 5 + * @return Configured QRegularExpression */ -#if QT_VERSION >= 0x050000 static QRegularExpression regExFactory(const QString ®ExString, bool caseSensitive); -#else - static QRegExp regExFactory(const QString ®ExString, bool caseSensitive); -#endif /** * Escapes any regular expression characters in a string so they have no special meaning @@ -244,18 +231,10 @@ private: bool _sourceExpressionEmpty = false; ///< Cached expression match string is empty /// Underlying regular expression matching instance for normal (noninverted) rules -#if QT_VERSION >= 0x050000 QRegularExpression _matchRegEx = {}; -#else - QRegExp _matchRegEx = {}; -#endif bool _matchRegExActive = false; ///< If true, use normal expression in matching /// Underlying regular expression matching instance for inverted rules -#if QT_VERSION >= 0x050000 QRegularExpression _matchInvertRegEx = {}; -#else - QRegExp _matchInvertRegEx = {}; -#endif bool _matchInvertRegExActive = false; ///< If true, use invert expression in matching };