D6061: prototype of kactivity-based most used modules entries

David Edmundson noreply at phabricator.kde.org
Thu Jun 1 16:53:48 UTC 2017


davidedmundson added inline comments.

INLINE COMMENTS

> ModuleView.cpp:349
> +    if (activeModule) {
> +        KActivities::ResourceInstance::notifyAccessed(QUrl("kcm:" + activeModule->moduleInfo().service()->storageId()),
> +                "org.kde.systemsettings");

not "kcm:/" ?

> SidebarMode.cpp:133
> +
> +        auto updateModel = [this]() {
> +            if (m_resultModel->rowCount() >= 5) {

Can I propose an alternative:

At the moment you have

QSortFilterProxy -> (ResultModel or DefaultModel)

It might be neater to have

QSortFilterProxy -> KConcatanateRowsProxyModel (ResultModel and DefaultModel)

this means it'll start showing recently used as soon as you open 1 module and you don't need to have any logic code here.

> SidebarMode.cpp:163
> +        const QString desktopName = sourceModel()->data(mappedIndex, ResultModel::ResourceRole).toUrl().path();
> +
> +        if (m_menuItems.contains(desktopName)) {

just

desktopName = QSortFilterProxyModel::data(index).

> SidebarMode.cpp:175
> +        }
> +        mi->setService(service);
> +

don't you only need to do this when you create new MenuItem?

REPOSITORY
  R124 System Settings

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

To: mart, #plasma, #vdg
Cc: davidedmundson, abetts, plasma-devel, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, sebas, apol, mart, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170601/bad6dfe4/attachment-0001.html>


More information about the Plasma-devel mailing list