GH-93 add an option to not copy saves on instance copy
This commit is contained in:
@ -8,5 +8,5 @@ public:
|
||||
|
||||
public:
|
||||
virtual ~IPathMatcher(){};
|
||||
virtual bool matches(const QString &string) = 0;
|
||||
virtual bool matches(const QString &string) const = 0;
|
||||
};
|
||||
|
@ -15,7 +15,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual bool matches(const QString &string) override
|
||||
virtual bool matches(const QString &string) const override
|
||||
{
|
||||
for(auto iter: m_matchers)
|
||||
{
|
||||
|
@ -5,13 +5,26 @@ class RegexpMatcher : public IPathMatcher
|
||||
{
|
||||
public:
|
||||
virtual ~RegexpMatcher() {};
|
||||
RegexpMatcher(QString regexp)
|
||||
RegexpMatcher(const QString ®exp)
|
||||
{
|
||||
m_regexp.setPattern(regexp);
|
||||
m_onlyFilenamePart = !regexp.contains('/');
|
||||
}
|
||||
|
||||
virtual bool matches(const QString &string) override
|
||||
RegexpMatcher &caseSensitive(bool cs = true)
|
||||
{
|
||||
if(cs)
|
||||
{
|
||||
m_regexp.setPatternOptions(QRegularExpression::CaseInsensitiveOption);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_regexp.setPatternOptions(QRegularExpression::NoPatternOption);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual bool matches(const QString &string) const override
|
||||
{
|
||||
if(m_onlyFilenamePart)
|
||||
{
|
||||
|
Reference in New Issue
Block a user