Commit 22d58adb authored by Marco Martin's avatar Marco Martin

search also in info() if is the module we want

some items that are categories with owning kcms have
d->service->desktopEntryName() is not the name of the owning kcm
in this case the real desktop name of the kcm is item().fileName()

BUG:429477
parent b03bd36b
......@@ -169,8 +169,12 @@ void MenuItem::updateDefaultIndicator()
MenuItem *MenuItem::descendantForModule(const QString &moduleName)
{
if (d->service && d->service->desktopEntryName() == moduleName) {
return this;
if (d->service) {
if (d->service->desktopEntryName() == moduleName) {
return this;
} else if (item().fileName().length() > 0 && item().fileName().split(QLatin1Char('.'), QString::SkipEmptyParts).first() == moduleName) {
return this;
}
}
for (auto *child : d->children) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment