Commit 536d695a authored by Nate Graham's avatar Nate Graham
Browse files

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

This reverts commit 0b938e5f.

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.
parent b6d5966c
Pipeline #170943 passed with stage
in 6 minutes and 22 seconds
......@@ -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();
......
Supports Markdown
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