Bug 375166

Summary: Do not use hardcoded path for kdeglobals
Product: [Applications] kajongg Reporter: Burkhard Lück <lueck>
Component: generalAssignee: Wolfgang Rohdewald <wolfgang>
Status: RESOLVED FIXED    
Severity: normal CC: kde-games-bugs-null, wolfgang
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Burkhard Lück 2017-01-17 05:44:05 UTC
recent kajongg master kf5 build from sources

kdestub.py has this line
        conf = KConfig('~/.config/kdeglobals')

running kajongg from konsole I get this error:
[snip]
  File "/home/kdeframeworks/kf5/share/kajongg/kdestub.py", line 1155, in initStyle
    iconStyle = conf.group('Icons').readEntry('Theme').lower()
AttributeError: 'NoneType' object has no attribute 'lower'

reason for this error:
ls ~/.config/kdeglobals
/home/kdeframeworks/.config/kdeglobals: No such file or directory
kdeframeworks@tuxedo:~/src$ ls ~/.config5/kdeglobals
/home/kdeframeworks/.config5/kdeglobals

using qtpaths the correct file is found:
$ qtpaths --paths GenericConfigLocation
/home/kdeframeworks/.config5:/home/kdeframeworks/kf5/etc/xdg::/etc/xdg

see also https://techbase.kde.org/Projects/Documentation/KDE_(health_table)#Using_paths