diff --git a/lib/utils/regex-config.cpp b/lib/utils/regex-config.cpp index 2bfa9e24..ac9ce029 100644 --- a/lib/utils/regex-config.cpp +++ b/lib/utils/regex-config.cpp @@ -79,11 +79,12 @@ bool RegexConfig::Matches(const std::string &text, QString::fromStdString(expression)); } -RegexConfig RegexConfig::PartialMatchRegexConfig() +RegexConfig RegexConfig::PartialMatchRegexConfig(bool enabled) { - RegexConfig conf; - conf._partialMatch = true; - return conf; + RegexConfig regex; + regex._partialMatch = true; + regex._enable = enabled; + return regex; } RegexConfigWidget::RegexConfigWidget(QWidget *parent, bool showEnable) diff --git a/lib/utils/regex-config.hpp b/lib/utils/regex-config.hpp index 1c51ad6d..256fba77 100644 --- a/lib/utils/regex-config.hpp +++ b/lib/utils/regex-config.hpp @@ -37,7 +37,7 @@ public: EXPORT bool Matches(const std::string &text, const std::string &expression) const; - EXPORT static RegexConfig PartialMatchRegexConfig(); + EXPORT static RegexConfig PartialMatchRegexConfig(bool enabled = false); private: bool _enable = false;