Reduce C++ fancyness
GCC 5.5 don’t like it. Revert once MXE catches up. Or not.
This commit is contained in:
parent
ca524131a5
commit
ab472b748d
1 changed files with 4 additions and 2 deletions
|
@ -9,7 +9,8 @@ void EventFilter::setFilter(const QString& text)
|
||||||
filters.clear();
|
filters.clear();
|
||||||
if (!text.isEmpty()) {
|
if (!text.isEmpty()) {
|
||||||
for (const auto &s : text.split(QRegularExpression{"\\s+"})) {
|
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()});
|
filters.append({"", s.trimmed()});
|
||||||
else
|
else
|
||||||
filters.append({s.left(split).trimmed(), s.mid(split+1).trimmed()});
|
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)
|
static bool matches(const QVariantMap& values, const QString& name, const QString& value)
|
||||||
{
|
{
|
||||||
for (auto kv = values.constKeyValueBegin(); kv != values.constKeyValueEnd(); kv++) {
|
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))
|
if (!name.isEmpty() && !fieldName.startsWith(name))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue