diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,7 @@ KIO Service WindowSystem + Activities OPTIONAL_COMPONENTS Su QUIET diff --git a/kcmshell/CMakeLists.txt b/kcmshell/CMakeLists.txt --- a/kcmshell/CMakeLists.txt +++ b/kcmshell/CMakeLists.txt @@ -10,6 +10,7 @@ KF5::KCMUtils KF5::I18n KF5::WindowSystem + KF5::Activities ) install(TARGETS kdeinit_kcmshell5 ${INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/kcmshell/main.cpp b/kcmshell/main.cpp --- a/kcmshell/main.cpp +++ b/kcmshell/main.cpp @@ -33,12 +33,14 @@ #include #include +#include #include #include #include #include -#include +#include +#include #include #include @@ -122,6 +124,15 @@ setModal(false); QDBusConnection::sessionBus().registerObject("/KCModule/dialog", this, QDBusConnection::ExportScriptableSlots); + + connect(this, &KCMShellMultiDialog::currentPageChanged, + this, [this](KPageWidgetItem *newPage,KPageWidgetItem *oldPage) { + KCModuleProxy *activeModule = qobject_cast(newPage->widget()); + if (activeModule) { + KActivities::ResourceInstance::notifyAccessed(QUrl("kcm:" + activeModule->moduleInfo().service()->storageId()), + "org.kde.systemsettings"); + } + }); } void KCMShellMultiDialog::activate(const QByteArray& asn_id)