14 : m_severity(severity), m_msgText(text.trimmed()), m_category(category.trimmed())
17 this->
m_valid = !((severity == CStatusMessage::SeverityInfo || severity == CStatusMessage::SeverityDebug) &&
23 if (!this->
isValid()) {
return inContainer; }
27 if (!(m_severity == CStatusMessage::SeverityInfo || m_severity == CStatusMessage::SeverityDebug))
29 if (!msg.isSeverityHigherOrEqual(this->m_severity)) {
continue; }
37 if (!this->m_category.
isEmpty())
55 if (CLogPattern::allHumanReadableNames().contains(m_category))
57 return CVariant::from(CLogPattern::fromHumanReadableName(m_category).withSeverityAtOrAbove(m_severity));
59 return CVariant::from(CLogPattern::exactMatch(m_category).withSeverityAtOrAbove(m_severity));
62 CLogCategoryList categories = CLogCategoryList::fromQStringList(CLogCategories::allSpecialCategories());
70 const auto strings = CLogPattern::fromHumanReadableName(name).getCategoryStrings();
71 return strings.isEmpty() ?
QString {} : *strings.
begin();
74 return CVariant::from(CLogPattern::anyOf(categories.
join(humanCats)).withSeverityAtOrAbove(m_severity));
virtual swift::misc::CVariant getAsValueObject() const
Return an implementation-specific value object representing the filter.
virtual swift::misc::CStatusMessageList filter(const swift::misc::CStatusMessageList &inContainer) const
Used container data.
bool m_valid
is filter valid?
bool stringMatchesFilterExpression(const QString &value, const QString &filter, Qt::CaseSensitivity cs=Qt::CaseInsensitive) const
Standard string search supporting wildcard at begin and end: "*xyz", "abc*".
bool isValid() const
Anything to do?
A log category is an arbitrary string tag which can be attached to log messages.
A sequence of log categories.
auto transform(F function) const
Return a new container generated by applying some transformation function to all elements of this one...
Generic sequential container with value semantics.
int removeIf(Predicate p)
Remove elements for which a given predicate returns true.
void push_back(const T &value)
Appends an element at the end of the sequence.
CSequence join(const CSequence &other) const
Concatenates two sequences and returns the result.
Streamable status message, e.g.
Status messages, e.g. from Core -> GUI.
Wrapper around QVariant which provides transparent access to CValueObject methods of the contained ob...
QString toQString(bool i18n=false) const
Cast as QString.
Models to be used with views, mainly QTableView.
Free functions in swift::misc.
StatusSeverity
Status severities.
QString::iterator begin()
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
bool isEmpty() const const