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

Kai Uwe Broulik noreply at phabricator.kde.org
Thu Dec 12 16:51:06 GMT 2019


broulik added inline comments.

INLINE COMMENTS

> ksortfilterproxymodel.h:2
> +/*
> + *   Copyright 2010 by Marco MArtin <mart at kde.org>
> +

*Martin

> ksortfilterproxymodel.h:44
> +     */
> +    Q_PROPERTY(QString filterRegExp READ filterRegExp WRITE setFilterRegExp NOTIFY filterRegExpChanged)
> +

Did you try that `QRegularExpression` vs `QRegExp` thing?

> ksortfilterproxymodel.h:58
> +     * that uses filterRegExp or filterString; while filterCallback is set those two properties are
> +     * ignored. Attempts to write a non-callable to this property are silently ignored, but you can set
> +     * it to null.

"but you can set it to null" - I think this thing needs a `RESET` method

> ksortfilterproxymodel.h:80
> +     */
> +    Q_PROPERTY(QString filterRole READ filterRole WRITE setFilterRole)
> +

needs `NOTIFY` signals, as do the ones below

> ksortfilterproxymodel.h:99
> +    explicit KSortFilterProxyModel(QObject *parent = nullptr);
> +    ~KSortFilterProxyModel();
> +

`override`?

> ksortfilterproxymodel.h:118
> +
> +    void setSortRole(const QString &role);
> +    QString sortRole() const;

Shouldn't this be an `int` and then you can drop all of that role names stuff?

REPOSITORY
  R275 KItemModels

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

To: davidedmundson
Cc: 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/20191212/5642fc93/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list