Commit 85ed16cd authored by Fabian Vogt's avatar Fabian Vogt

Honour the NoDisplay attribute of KServices

Summary:
kcmshell5 refuses to load modules that have this set and
when clicking on them in systemsettings, an empty page with
no button to go back to the overview is shown. So just don't
show them to the user.

Test Plan:
Started systemsettings5 in a X11 session, "Accessibility" is shown.
Did the same in a wayland session, it is not shown anymore.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D6612
parent 8ae4691e
......@@ -225,9 +225,12 @@ void SettingsBase::initMenuList(MenuItem * parent)
const QString category = entry->property("X-KDE-System-Settings-Parent-Category").toString();
const QString category2 = entry->property("X-KDE-System-Settings-Parent-Category-V2").toString();
if( !parent->category().isEmpty() && (category == parent->category() || category2 == parent->category()) ) {
// Add the module info to the menu
MenuItem * infoItem = new MenuItem(false, parent);
infoItem->setService( entry );
if (!entry->noDisplay() ) {
// Add the module info to the menu
MenuItem * infoItem = new MenuItem(false, parent);
infoItem->setService( entry );
}
removeList.append( modules.at(i) );
}
}
......
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