From 6cd542b21f1f6ce9070d590c877cd858350dae37 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Sun, 10 Nov 2024 09:51:33 +0500 Subject: [PATCH] UI: RuleTextParser: Add parseNot() --- src/ui/util/conf/ruletextparser.cpp | 10 ++++++++-- src/ui/util/conf/ruletextparser.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ui/util/conf/ruletextparser.cpp b/src/ui/util/conf/ruletextparser.cpp index dbafec78..86408510 100644 --- a/src/ui/util/conf/ruletextparser.cpp +++ b/src/ui/util/conf/ruletextparser.cpp @@ -215,8 +215,7 @@ bool RuleTextParser::parseSectionChar() return parseName(); } break; case CharNot: { - m_ruleFilter.isNot = !m_ruleFilter.isNot; - return true; + return parseNot(); } break; case CharColon: { m_ruleFilter.isSectionEnd = true; @@ -308,6 +307,13 @@ bool RuleTextParser::parseName() return true; } +bool RuleTextParser::parseNot() +{ + m_ruleFilter.isNot = !m_ruleFilter.isNot; + + return true; +} + void RuleTextParser::parseBracketValues() { RuleCharTypes expectedSeparator = CharNone; diff --git a/src/ui/util/conf/ruletextparser.h b/src/ui/util/conf/ruletextparser.h index 7b23682b..04f4fdf6 100644 --- a/src/ui/util/conf/ruletextparser.h +++ b/src/ui/util/conf/ruletextparser.h @@ -106,6 +106,7 @@ private: bool checkListEnd(); bool parseName(); + bool parseNot(); void parseBracketValues(); bool parseBracketValue(RuleCharTypes expectedSeparator);