diff --git a/event_filter.cpp b/event_filter.cpp index d3f5e17..68aa702 100644 --- a/event_filter.cpp +++ b/event_filter.cpp @@ -9,7 +9,8 @@ void EventFilter::setFilter(const QString& text) filters.clear(); if (!text.isEmpty()) { for (const auto &s : text.split(QRegularExpression{"\\s+"})) { - if (const int split = s.indexOf(":"); split == -1) + const int split = s.indexOf(":"); + if (split == -1) filters.append({"", s.trimmed()}); else filters.append({s.left(split).trimmed(), s.mid(split+1).trimmed()}); @@ -27,7 +28,8 @@ bool EventFilter::remove(int row) static bool matches(const QVariantMap& values, const QString& name, const QString& value) { for (auto kv = values.constKeyValueBegin(); kv != values.constKeyValueEnd(); kv++) { - const auto& [fieldName, fieldValue] = *kv; + const auto& fieldName = kv->first; + const auto& fieldValue = kv->second; if (!name.isEmpty() && !fieldName.startsWith(name)) continue;