Commit 1284263f authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Global Menu] Check for m_searchAction instead of Wayland

It's more semantic that way.

(And lets me force the menu on for debugging more easily)
parent 6790b66c
Pipeline #174515 passed with stage
in 5 minutes and 50 seconds
......@@ -158,7 +158,7 @@ int AppMenuModel::rowCount(const QModelIndex &parent) const
return 0;
}
return m_menu->actions().count() + (KWindowSystem::isPlatformWayland() ? 1 : 0);
return m_menu->actions().count() + (m_searchAction ? 1 : 0);
}
void AppMenuModel::removeSearchActionsFromMenu()
......@@ -247,7 +247,7 @@ QVariant AppMenuModel::data(const QModelIndex &index, int role) const
const auto actions = m_menu->actions();
const int row = index.row();
if (row == actions.count() && KWindowSystem::isPlatformWayland()) {
if (row == actions.count() && m_searchAction) {
if (role == MenuRole) {
return m_searchAction->text();
} else if (role == ActionRole) {
......
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