blaze added a comment.

  This changeset breaks the app, making it impossible to get the list of 
entries from outside. Tested against Falkon browser with KDE integration 
plugin. See my inline comments here

INLINE COMMENTS

> kwallet.cpp:179
>          if (searchItemsJob->exec()) {
> -            QRegExp re(key, Qt::CaseSensitive, QRegExp::Wildcard);
> +            const QRegularExpression re(QRegularExpression::anchoredPattern(
> +                                          
> QRegularExpression::wildcardToRegularExpression(key)));

anchoredPattern() is excessive here, it creates a horror like that 
"\\A(?:\\A(?:[^/]*)\\z)\\z" with the stuff being anchored twice.
It has to be removed with no doubt at all.

> kwallet.cpp:180
> +            const QRegularExpression re(QRegularExpression::anchoredPattern(
> +                                          
> QRegularExpression::wildcardToRegularExpression(key)));
>              const auto list = searchItemsJob->items();

The output of wildcardToRegularExpression() method is different from what was 
before and it breaks the app. It has to be replaced with something else.

> kwalletbackend.cc:533
>  
> -    QRegExp re(key, Qt::CaseSensitive, QRegExp::Wildcard);
> +    QRegularExpression re(QRegularExpression::anchoredPattern(
> +                           
> QRegularExpression::wildcardToRegularExpression(key)));

Same here as well.

> kwalletbackend.cc:534
> +    QRegularExpression re(QRegularExpression::anchoredPattern(
> +                           
> QRegularExpression::wildcardToRegularExpression(key)));
>  

and here

REPOSITORY
  R311 KWallet

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

To: ahmadsamir, #frameworks, aacid, apol
Cc: blaze, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

Reply via email to