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

Reply via email to