*** If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports Please remove this comment after reading and before submitting - thanks! *** SUMMARY STEPS TO REPRODUCE 1. Edit a menu entry. 2. Type "-u VARIABLE_NAME" in "Environment Variables" field. 3. Type "program" in "Program" field. 4. Type "agruments" in "Arguments" field. 5. Save entry. 6. Switch to a different menu entry, then switch back to the newly created entry. OBSERVED RESULT "Environment Variables" field is empty, "Program" field contains "-u", "Command-Line Arguments" field contains "VARIABLE_NAME program arguments". If saved again at this point, the menu entry will stop working (ie. the program will not launch). EXPECTED RESULT "Environment Variables" field should contain "-u VARIABLE_NAME", "Program" field should contains "program", "Command-Line Arguments" should contain "arguments". SOFTWARE/OS VERSIONS KDE Plasma Version: 6.1.5 KDE Frameworks Version: 6.6.0 Qt Version: 6.7.2 ADDITIONAL INFORMATION After doing steps 1-5, the menu entry itself is saved correctly; in this case, in the .desktop file there's "Exec=env -u TEST program arguments". When editing such menu entry and saving incorrectly parsed values, it breaks and is saved as "Exec=-u TEST program arguments".
I can reproduce this on version 6.2.3. It is worth noting that clicking "Save" alone after viewing the incorrectly parsed entry didn't overwrite with an incorrect Exec= line for me - I needed to make an edit the incorrect entry without fixing it in order for the incorrect line to be written.