diff --git a/kcmshell/main.cpp b/kcmshell/main.cpp --- a/kcmshell/main.cpp +++ b/kcmshell/main.cpp @@ -127,7 +127,8 @@ connect(this, &KCMShellMultiDialog::currentPageChanged, this, [this](KPageWidgetItem *newPage,KPageWidgetItem *oldPage) { - KCModuleProxy *activeModule = qobject_cast(newPage->widget()); + Q_UNUSED(oldPage); + KCModuleProxy *activeModule = newPage->widget()->findChild(); if (activeModule) { KActivities::ResourceInstance::notifyAccessed(QUrl("kcm:" + activeModule->moduleInfo().service()->storageId()), "org.kde.systemsettings");