From 483bdc237c92f73bb7d281127d4a93a74d0e3eea Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Sat, 28 Jan 2023 16:30:49 +0100 Subject: [PATCH] Add option to create partial matching RegexConf --- src/utils/regex-config.cpp | 7 +++++++ src/utils/regex-config.hpp | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/utils/regex-config.cpp b/src/utils/regex-config.cpp index 5b4bcdae..69e5651d 100644 --- a/src/utils/regex-config.cpp +++ b/src/utils/regex-config.cpp @@ -47,6 +47,13 @@ RegexConfig::GetRegularExpression(const std::string &expr) const return GetRegularExpression(QString::fromStdString(expr)); } +RegexConfig RegexConfig::PartialMatchRegexConfig() +{ + RegexConfig conf; + conf._partialMatch = true; + return conf; +} + RegexConfigWidget::RegexConfigWidget(QWidget *parent) : QWidget(parent), _openSettings(new QPushButton()), diff --git a/src/utils/regex-config.hpp b/src/utils/regex-config.hpp index 7082c33f..59b5e9a9 100644 --- a/src/utils/regex-config.hpp +++ b/src/utils/regex-config.hpp @@ -25,6 +25,8 @@ public: QRegularExpression GetRegularExpression(const QString &) const; QRegularExpression GetRegularExpression(const std::string &) const; + static RegexConfig PartialMatchRegexConfig(); + private: bool _enable = false; bool _partialMatch = false;