D21583: [FilteredDirIterator] Combine all suffixes into one large RegExp

Nathaniel Graham noreply at phabricator.kde.org
Thu Jun 6 14:47:18 BST 2019


ngraham added a comment.


  This fixes it for me:
  
    diff --git a/src/file/regexpcache.cpp b/src/file/regexpcache.cpp
    index f47757ff..dce5cdcb 100644
    --- a/src/file/regexpcache.cpp
    +++ b/src/file/regexpcache.cpp
    @@ -78,9 +78,9 @@ void RegExpCache::rebuildCacheFromFilterList(const QStringList& filters)
         }
     
         // Combine all suffixes into one large RE: "^.*(foo|bar|baz)$"
    -    auto suffixMatch = QLatin1String("^.*\\.(");
    -    suffixMatch += suffixes.join(QChar('|'));
    -    suffixMatch += QLatin1String(")$");
    +    auto suffixMatch = QLatin1String("^.*\\.(")
    +        + suffixes.join(QChar('|'))
    +        + QLatin1String(")$");
         qCDebug(BALOO) << suffixMatch;
         m_regexpCache.prepend(QRegularExpression(suffixMatch));
     }

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D21583

To: bruns, #baloo, ngraham, poboiko
Cc: bcooksley, kde-frameworks-devel, LeGast00n, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190606/deebdc8c/attachment.html>


More information about the Kde-frameworks-devel mailing list