Revert "[Global Menu] Respect toplevel menu action visibility"

This reverts commit 0b938e5ffb.

This change broke the global menu, causing
https://bugs.kde.org/show_bug.cgi?id=453301.

Reverting for now so it doesn't end up in a release before we can fix
it.
wilder-5.24
Nate Graham 4 years ago
parent b6d5966ce3
commit 536d695a08
  1. 2
      applets/appmenu/package/contents/ui/main.qml
  2. 4
      applets/appmenu/plugin/appmenumodel.cpp

@ -114,7 +114,7 @@ Item {
down: pressed || plasmoid.nativeInterface.currentIndex === index
visible: text !== "" && model.activeActions.visible
visible: text !== ""
onClicked: {
plasmoid.nativeInterface.trigger(this, index)

@ -242,7 +242,7 @@ QVariant AppMenuModel::data(const QModelIndex &index, int role) const
if (role == MenuRole) {
return QString();
} else if (role == ActionRole) {
return QVariant::fromValue(m_menu->menuAction());
return QVariant::fromValue((void *)(m_menu->menuAction()));
}
}
@ -262,7 +262,7 @@ QVariant AppMenuModel::data(const QModelIndex &index, int role) const
if (role == MenuRole) { // TODO this should be Qt::DisplayRole
return actions.at(row)->text();
} else if (role == ActionRole) {
return QVariant::fromValue(actions.at(row));
return QVariant::fromValue((void *)actions.at(row));
}
return QVariant();

Loading…
Cancel
Save