Created attachment 138645 [details] screenshot STEPS TO REPRODUCE 1. Open 'Virtual Desktops' KCM 2. Check/uncheck "Show on screen display when switching' 3. click on Apply button 4. click on Add button OBSERVED RESULT a virtual desktop is added and a row labeled "Row %1(i18n_argument_missing)" appears. It disappears next time we open Virtual Desktops KCM. Please see the attached screenshot. EXPECTED RESULT row "Row %1(i18n_argument_missing)" should not appear SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.22.80 KDE Frameworks Version: 5.83.0 Qt Version: 5.15.2 Graphics Platform: X11
You'll only see that on debug builds. On regular builds it'll just say "Row " Not that that's much better
I can reproduce this on master. When I comment out https://invent.kde.org/plasma/kwin/-/blob/master/src/kcmkwin/kwindesktop/desktopsmodel.cpp#L648 it appears to work fine
VirtualDesktops::save() calls desktopsModel()->syncWithServer() which sets m_synchronizing to true, resulting in syncWithServer() being called.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1025
Git commit 7f36f012478722e0cda859b28fdd7cd2d63f4225 by Nicolas Fella. Committed on 24/05/2021 at 11:53. Pushed by nicolasfella into branch 'master'. [kcms/virtualdesktops] Properly track synchronizing state When the user applies a change like adding a desktop DesktopsModel::syncWithServer is called and m_synchronizing is set to true. The server then sends some kind of response (e.g. desktopCreated) and updateModifiedState is called which sets m_synchronizing to false again. However if a setting is changed that does not trigger any server change (e.g. the show OSD setting) m_synchonizing is never set to false again, causing problems down the line. Instead of relying on updateModifiedState to reset m_synchronizing track the syncronizing state by refcounting the DBus calls M +8 -10 src/kcmkwin/kwindesktop/desktopsmodel.cpp M +1 -1 src/kcmkwin/kwindesktop/desktopsmodel.h https://invent.kde.org/plasma/kwin/commit/7f36f012478722e0cda859b28fdd7cd2d63f4225
Git commit c9329ec6d99d5f198fbb88d5dfd714c1d38a9624 by Nicolas Fella. Committed on 24/05/2021 at 11:54. Pushed by nicolasfella into branch 'Plasma/5.22'. [kcms/virtualdesktops] Properly track synchronizing state When the user applies a change like adding a desktop DesktopsModel::syncWithServer is called and m_synchronizing is set to true. The server then sends some kind of response (e.g. desktopCreated) and updateModifiedState is called which sets m_synchronizing to false again. However if a setting is changed that does not trigger any server change (e.g. the show OSD setting) m_synchonizing is never set to false again, causing problems down the line. Instead of relying on updateModifiedState to reset m_synchronizing track the syncronizing state by refcounting the DBus calls (cherry picked from commit 7f36f012478722e0cda859b28fdd7cd2d63f4225) M +8 -10 src/kcmkwin/kwindesktop/desktopsmodel.cpp M +1 -1 src/kcmkwin/kwindesktop/desktopsmodel.h https://invent.kde.org/plasma/kwin/commit/c9329ec6d99d5f198fbb88d5dfd714c1d38a9624