rkflx accepted this revision. rkflx added a comment. This revision is now accepted and ready to land. | View Revision
Nice, accepting this for now (there's still one simplification you could make, though, see inline comment).
That said:
If no one speaks up within a week, I'd say you can land the patch.
Meanwhile I learned (while checking why you kept toString(QKeySequence::NativeText) compared to my suggestion) that this can be written even simpler, no need for the if at all:
runCommandAction->setShortcuts(runCommandShortcutList);
It was supposed to serve as reminder of how the parameters for the globalShortcut method were determined. To help debugging later. Should it be removed?
At least elsewhere there is no such comment and I doubt the object's name will change in the future, but if you want to keep it, that's also fine with me.
Yes, is this much better.
Might there be a chance of a some kind of keyboard shortcut conflict because we now set it also locally?
Might there be a chance of a some kind of keyboard shortcut conflict because we now set it also locally?
Not sure whether there are any guarantees, but at least swapping the shortcuts between Run Command and Kill a Window, we can observe that in case of (silent) conflicts the global shortcut has precedence, i.e. "it works"™.
Perhaps only setting the string is cleaner, but then due to \t we'd have RTL problems again like in your other patch. I'd go the shortcut way, unless anybody from #Plasma comes up with good reasons not to.