https://bugs.kde.org/show_bug.cgi?id=454947
Bug ID: 454947 Summary: Cannot map buttons due to incorrect xsetwacom invocation Product: wacomtablet Version: unspecified Platform: Compiled Sources OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: jazzv...@gmail.com Reporter: szpaj...@gmail.com Target Milestone: --- Commit dd97e6ab6a0a91d01d54a02131685e5d1fc78c05 ("Fix Qt 5.15 obsoletions") introduced the new syntax of QProcess.start() routine in xsetwacomadaptor.cpp (modified further in 88422002167f941e1457695a0e9fa3b1212c32f3). It requires command arguments to be passed as a QStringList rather than as a single QString. Unfortunately this broke the ability to map express buttons because the resulting xsetwacom command line string is built incorrectly. The current invocation in XsetwacomAdaptor::setParameter(): setConf.start(QString::fromLatin1("xsetwacom"), QStringList() << QString::fromLatin1("set") << device << param); results in the following execve() call for button mappings: execve("/usr/bin/xsetwacom", ["/usr/bin/xsetwacom", "set", "Wacom Intuos4 4x6 Pad pad", "Button 1", "key ctrl shift e"], 0x7ffe783a6088 /* 74 vars */ <unfinished ...> This is incorrect, because xsetwacom expects "Button" and the button number to be in separate arguments, while the above call passes it as one. Executing the above command string manually yields the following error: $ "/usr/bin/xsetwacom" "set" "Wacom Intuos4 4x6 Pad pad" "Button 1" "key ctrl shift e" Parameter 'Button 1' is no longer in use. It was replaced with 'Button'. The old way of doing this was: cmd = QString::fromLatin1( "xsetwacom set \"%1\" %2 \"%3\"" ).arg( device ).arg( param ).arg( value ); QProcess setConf; setConf.start( cmd ); which produced this: execve("/usr/bin/xsetwacom", ["/usr/bin/xsetwacom", "set", "Wacom Intuos4 4x6 Pad pad", "Button", "1", "key ctrl shift e"], 0x7ffcfd4ad278 /* 75 vars */ <unfinished ...> and this works fine, because %2 is not enclosed in quotes, so "Button 1" gets split in two arguments. Further changes to the xsetwacom launching code introduced in commit 88422002167f941e1457695a0e9fa3b1212c32f3 did not fix the problem. STEPS TO REPRODUCE 1. Install wacomtablet.so from current git master 2. Try to map some buttons in the Express Buttons GUI 3. Apply the changes or replug the tablet OBSERVED RESULT Mappings are set according to the settings entered in the GUI EXPECTED RESULT Mappings are kept at their defaults. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Gentoo KDE Plasma Version: 5.23.5 KDE Frameworks Version: 5.90.0 Qt Version: 5.15.3 ADDITIONAL INFORMATION -- You are receiving this mail because: You are watching all bug changes.