D26205: KWallet: Port QRegExp to QRegularExpression

Ahmad Samir noreply at phabricator.kde.org
Thu Jan 16 09:10:47 GMT 2020


ahmadsamir added a comment.




INLINE COMMENTS

> blaze wrote in kwallet.cpp:180
> > The transformation is targeting file path globbing, which means in particular that path separators receive special treatment.
> 
> I'm pretty sure the file path case is different from what we have here.
> 
> Also
> 
> > In order to match one of the special characters, place it in square brackets (for example, "[?]")
> 
> Doesn't it mean you can't just use a bare raw wildcard?
> 
> So my suggestion is just to rollback to the previous solution, at least temporarily, until we don't have something better.

The part about "[?]"; in the QRegularExpression documentation https://doc.qt.io/qt-5/qregularexpression.html#wildcardToRegularExpression "?" is used for wild card matching:

> ?   Matches any single character. It is the same as . in full regexps.

IIUC, the comment about "[?]" means if wildcardToRegularExpression() is used and you want to match a literal "?" character you'll have to use square brackets "[?]", different issue.

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200116/0f1672a7/attachment.html>


More information about the Kde-frameworks-devel mailing list