D25326: Move Plasma's SortFilterProxyModel into KItemModel's QML plugin

Ahmad Samir noreply at phabricator.kde.org
Thu Jan 9 16:50:29 GMT 2020


ahmadsamir added inline comments.

INLINE COMMENTS

> ksortfilterproxymodel.cpp:101
> +{
> +    return QSortFilterProxyModel::filterRegExp().pattern();
> +}

In setFilterRegExp(), QSortFilterProxyModel::setFilterRegularExpression(QRegularExpression &) is used, so IIUC here it should be :
QSortFilterProxyModel::filterRegularExpression().pattern()

> ksortfilterproxymodel.h:103
> +
> +    void setFilterRegExp(const QString &exp);
> +    QString filterRegExp() const;

Hello. Since you're using QRegularExpression, maybe rename to setFilterRegex() or setFitlerRegularExpression() (the latter matches QSortFilterProxyModel naming schema) to avoid QRegExp vs QRegularExpression confusion?

(Another pro for renaming setFilterRegExp() to setFilterRegularExpression()).

REPOSITORY
  R275 KItemModels

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

To: davidedmundson
Cc: ahmadsamir, broulik, ahiemstra, mart, 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/20200109/8bf2b175/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list