Bug 367074

Summary: mouse single/double-click preferences not propagated to kde4 applications
Product: [Applications] systemsettings Reporter: nicholas <ndcunliffe>
Component: kcm_mouseAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: paul.necas, unassigned-bugs, wbauer1
Priority: NOR    
Version: 5.7.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 5.7.4
Sentry Crash Report:

Description nicholas 2016-08-17 06:33:39 UTC
changing preferences for single or double click for opening files/folders is not propagated to kde4 applications. 
~/.config/kdeglobals -> [kde] "SingleClick=" is correctly modified with user selection
~/.kde4/share/config/kdeglobals -> [kde] "SingleClick=" is NOT correctly modified with user selection

Reproducible: Always

Steps to Reproduce:
1. changie preferences from/to single or double click
2. open ~/.config/kdeglobals and view [kde] "SingleClick=" setting
3. open ~/.kde4/share/config/kdeglobals and view [kde] "SingleClick=" setting

Actual Results:  
kde4  "SingleClick=" setting not same as kde5 setting

Expected Results:  
should have same settings

This bug manifests for example in using kdialog file selector.
looks similar to Bug 343418 (have checked libkde.so is present)
# locate libkde.so 
/usr/lib64/kde4/plugins/gui_platform/libkde.so
Comment 1 Wolfgang Bauer 2016-08-17 13:12:32 UTC
I can confirm this with 5.7.3 (Framework 5.25.0, Qt 5.7.0) on openSUSE 13.2.

But it's not that it isn't propagated to the KDE4 settings.

What I noticed:
- open systemsettings5->Input Devices->Mouse, change to double-click and press Apply
~/.config/kdeglobals contains SingleClick=false as expected, but ~/.kde4/share/config/kdeglobals still has SingleClick=true

- switch back to single-click and press Apply
~/.config/kdeglobals now contains SingleClick=true again (as it should), but ~/.kde4/share/config/kdeglobals now has been changed to SingleClick=false...

So it seems the KDE4 settings are saved inverted.
Comment 2 Wolfgang Bauer 2016-08-17 14:18:32 UTC
(In reply to Wolfgang Bauer from comment #1)
> So it seems the KDE4 settings are saved inverted.

The problem seems to be that the KDE4 config is synchronized *before* the KF5 config is written.
So KDE4 actually gets the *previous* settings.

Proposed fix:
https://git.reviewboard.kde.org/r/128703/
Comment 3 Wolfgang Bauer 2016-08-18 08:29:52 UTC
Git commit 4f4da83327e66f125c8dd1749df8efe1b5084945 by Wolfgang Bauer.
Committed on 18/08/2016 at 08:26.
Pushed by wbauer into branch 'Plasma/5.7'.

[kcm_mouse] Sync KDE4 config after writing the KF5 settings, not before

Kdelibs4SharedConfig::syncConfigGroup() reads the settings from the
corresponding KF5 config files.
If we don't write them before, it will use the previous settings.

Also fix Kdelibs4SharedConfig::syncConfigGroup() to read the settings
from the specified config file instead of always kdeglobals.
Related: bug 348254
FIXED-IN: 5.7.4
REVIEW: 128703

M  +4    -3    kcms/input/mouse.cpp
M  +1    -1    kcms/migrationlib/kdelibs4config.h

http://commits.kde.org/plasma-desktop/4f4da83327e66f125c8dd1749df8efe1b5084945
Comment 4 nicholas 2016-08-18 10:25:46 UTC
just a note: konquerer settings affect kde4 but not kde5. This means that e.g. changing mouse settings in konquerer will affect all kde4 dialogues etc, possibly in contradiction to the true global setting (kde5). would it not be better to remove duplicated settings options?
Comment 5 Wolfgang Bauer 2016-08-18 11:13:26 UTC
(In reply to nicholas from comment #4)
> would it
> not be better to remove duplicated settings options?

Well, it's actually the KDE4-based dolphin that offers this setting (Konqueror uses an embedded dolphin for file-browsing and also embeds dolphin's settings into its config dialog).
It has been removed in the KF5 version of dolphin released a year ago (15.08), because it is a desktop-wide setting and not specific to dolphin (it wouldn't even be respected if you run dolphin in a different desktop IIANM).

So it would even be better to port Konqueror to KF5, I'd say, which would use the latest KF5 based dolphin.
And this has happened already anyway, 16.12.0 (i.e. the next feature release, as 16.08.0 is being released today) will include the KF5 based Konqueror AFAIK which then will also use the KF5 settings of course.
Comment 6 Wolfgang Bauer 2016-09-11 11:50:20 UTC
*** Bug 368577 has been marked as a duplicate of this bug. ***