D27097: Port from QRegExp to QRegularExpression
David Faure
noreply at phabricator.kde.org
Sat Feb 22 09:11:12 GMT 2020
dfaure requested changes to this revision.
dfaure added a comment.
This revision now requires changes to proceed.
OK for deprecating Incremental. A full revert (at KF6 time) of commit 9ac82e27ad0322e444c16 <https://phabricator.kde.org/R446:9ac82e27ad0322e444c1669e2d57332b58a70982> looks tricky though :-)
I searched the git history, and I can't see where we ever used FindIncremental... [I searched kdelibs, since I'm pretty sure this was added for KHTML]
You say that nothing calls find(QRegExp), that's because the find dialog just sets the option RegularExpression, right?
This makes sense actually. I don't see why we have this API. The user uses the dialog and checks a box...
It sounds like we should just deprecate find(QRegExp) and point to the RegularExpression option.
(and make it private, as you said, i.e. move to private class)
INLINE COMMENTS
> kfind.cpp:775
> d->pattern = pattern;
> - setOptions(options()); // rebuild d->regExp if necessary
> + // rebuild d->regex and d->regeExp (the latter is deprecated) if necessary
> + setOptions(options());
typo: additional 'e' in regeExp
> kfinddialog.cpp:567
> + if (!QRegularExpression(q->pattern()).isValid()) {
> + KMessageBox::error(q, i18n("Invalid regular expression (see the QRegularExpression documentation)."));
> return;
I doubt end users want to open Qt API documentation...
REPOSITORY
R310 KTextWidgets
REVISION DETAIL
https://phabricator.kde.org/D27097
To: ahmadsamir, #frameworks, mlaurent, dfaure
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200222/cdba9cdf/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list