Summary: | Kmenu entries launched with assigned shortcut do not execute command properly | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kglobalaccel | Reporter: | Dominik Kummer <admin> |
Component: | general | Assignee: | kdelibs bugs <kdelibs-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nate, nicolas.fella |
Priority: | NOR | ||
Version First Reported In: | 5.87.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Dominik Kummer
2021-10-31 17:13:15 UTC
It seems like this works fine once the kglobalaccel5 process is restarted A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kglobalaccel/-/merge_requests/31 I just tried to restart kglobalaccel5 but still observe the same behavior. It seems that --wmclass="class name" is parsed as --wmclass="class or something That seems to be an additional issue unrelated to the one I am describing. Looking at the code I see why it is failing, it splits the string on spaces, ignoring the shell syntax: https://invent.kde.org/frameworks/kglobalaccel/-/blob/master/src/runtime/kserviceactioncomponent.cpp#L41 Oh I see, maybe another "splitter" is used in krunner? Something like QCommandLineParser ? A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kglobalaccel/-/merge_requests/32 well KShell::splitArgs perfect! not even based on QCommandLineParser Thanks! Git commit 8a213c78cf1acfef28f7b7ba2bb5c4414100dc19 by Nicolas Fella. Committed on 31/10/2021 at 20:24. Pushed by nicolasfella into branch 'master'. Properly split exec line args Splitting at space breaks when using spaces escaped by shell syntax. Consider the following exec line: app --arg="foo bar" Previously this would be split into: (app, --arg="foo, bar) Now it is correclty split into: (app, --arg="foo bar") M +3 -1 src/runtime/kserviceactioncomponent.cpp https://invent.kde.org/frameworks/kglobalaccel/commit/8a213c78cf1acfef28f7b7ba2bb5c4414100dc19 Anything left to do here, or is this fully fixed now? unfortunately I havent compiled and tested the solution yet, but the code snipped looks very promising! well, https://invent.kde.org/frameworks/kglobalaccel/-/merge_requests/31/ isn't merged yet, other than that we should be good |