View Revision
rkflx accepted this revision.
rkflx added a comment.
This revision is now accepted and ready to land.

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.


INLINE COMMENTS
View Inlineksysguardprocesslist.cpp:430-432
if (runCommandShortcutList.size() > 0) {
runCommandAction->setShortcut(runCommandShortcutList[0].toString(QKeySequence::NativeText));
}

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);

View Inlinegregormi wrote in ksysguardprocesslist.cpp:421-427

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.


View Inlinegregormi wrote in ksysguardprocesslist.cpp:429

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.


REPOSITORY
R111 KSysguard Library

BRANCH
arcpatch-D10297_2

REVISION DETAIL
https://phabricator.kde.org/D10297

To: gregormi, Plasma, colomar, broulik, mart, hein, rkflx
Cc: apol, anthonyfieroni, andreaska, rkflx, ngraham, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, mart