QMenuItem: Make it a plain QObject
This isn't a visual item placed in the scene, Qt applying its recursive enabled/visible properties messes with the action's visibility in unpredictable and hard to debug ways.
Instead, make it a plain QObject and let us handle those properties entirely on our own.
I was debugging why the configure/alternatives menu items in Task Manager’s More menu wouldn’t show up properly under Plasma 6.
It seems the way Task Manager nests those menu items, causes intersting effects on the visible/enabled property, overriding the QAction
’s visibility with false
since the item this is in is effectively invisible, or something. I didn’t fully understand …
Nevertheless, this item isn’t a visual item to be placed in the scene, so it doesn’t need to be a QQuickItem
.
This API change has implications on consumers as it no longer has a default property, so you can no longer place arbitrary items, such as Connections
, Instantiator
inside of it, e.g. Task Manager and Kickoff, potentially others, would need to be ported away first. Makes me wonder if we should perhaps add one for compatibility?