Bug 437466 - "Row %1(i18n_argument_missing)" row appears when I add a virtual desktop after checking/unchecking "Show on screen display when switching"
Summary: "Row %1(i18n_argument_missing)" row appears when I add a virtual desktop afte...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kwinvirtualdesktops (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-21 14:10 UTC by Patrick Silva
Modified: 2021-05-24 14:24 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.22


Attachments
screenshot (116.05 KB, image/png)
2021-05-21 14:10 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2021-05-21 14:10:10 UTC
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
Comment 1 David Edmundson 2021-05-22 08:18:44 UTC
You'll only see that on debug builds. On regular builds it'll just say "Row "

Not that that's much better
Comment 2 Nicolas Fella 2021-05-22 09:25:20 UTC
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
Comment 3 Nicolas Fella 2021-05-22 09:39:10 UTC
VirtualDesktops::save() calls desktopsModel()->syncWithServer() which sets m_synchronizing to true, resulting in syncWithServer() being called.
Comment 4 Bug Janitor Service 2021-05-22 10:55:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1025
Comment 5 Nicolas Fella 2021-05-24 11:54:16 UTC
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
Comment 6 Nicolas Fella 2021-05-24 11:57:57 UTC
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