D26734: Revert readEntryList() to use QRegExp::Wildcard

Ahmad Samir noreply at phabricator.kde.org
Sat Jan 18 11:51:26 GMT 2020


ahmadsamir added a comment.


  In D26734#596420 <https://phabricator.kde.org/D26734#596420>, @dfaure wrote:
  
  > Any longer terms plan for porting away from QRegExp then?
  >
  > Or is it arguably a bug in QRegularExpression that is assumes globbing is only used for files?
  
  
  Qt upstream think that QRegularExpression is behaving correclty[1]; wildcard matching is used for file globbing patterns, so they make wildcardToRegularExpression return an anchored pattern, and exclude "/", which is again correct. Even QRegExp docs says the same:
  
  > QRegExp::Wildcard	This provides a simple pattern matching syntax similar to that used by shells (command interpreters) for "file globbing". See QRegExp wildcard matching.
  
  That it worked to match "all" entries in a KWallet "folder" was accidental. Also looking at the usage of readEntryList() in Falkon, technically it wants all the entries returned to list them in a configuration widget, i.e. "url | username | password".
  
  A long term plan, well, I had a suggestion in my first comment here, basically ditch wildcard matching in readEntryList() and use a full-fledged regex instead, and using e.g. ".*" to get all entries, or checking for an empty QString() param and treat it as "I want all the entries listed".
  
  [1] https://bugreports.qt.io/browse/QTBUG-81396

REPOSITORY
  R311 KWallet

BRANCH
  l-fix (branched from master)

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

To: ahmadsamir, #frameworks, dfaure, apol
Cc: blaze, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200118/b41a328d/attachment.html>


More information about the Kde-frameworks-devel mailing list