KNewStuff3 .knsrc file fails to load under Windows

Jasem Mutlaq mutlaqja at ikarustech.com
Thu Jun 30 20:41:13 UTC 2016


Ok, so I found the source of this problem. In kconfig.cpp #719 we have:

Q_FOREACH (const QString &f, QStandardPaths::locateAll(resourceType,
fileName)) {
     files.prepend(f);


For the KNewStuff3, the resourceType is GenericConfigLocation which on
Linux is ~/.config and /etc/xdg. Since the "kstars.knsrc" file is in
/etc/xdg, this works fine on Linux. On the other hand, on Windows, the
GenericConfigLocation is

"C:/Users/<USER>/AppData/Local", "C:/ProgramData"

But kstars.knsrc is install to $KDEROOT/etc/xdg or $APPIMAGEDIR/etc/xdg, so
this is why it fails to load it. Not sure how to resolve this issues
besides patching KConfig to add $XDG_DIR to be searched as well for that
file. Any thoughts?

Regards,
Jasem


On Thu, Jun 30, 2016 at 5:28 PM, Jasem Mutlaq <mutlaqja at ikarustech.com>
wrote:

> Hello,
>
> Found a new bug today when KStars KNewStuff3 was started. The error is
> "Configuration file kstars.knsrc is invalid".
>
> KNewStuff3 sends the filename as "kstars.knsrc" which is under Windows is
> installed to $KDEROOT/etc/xdg and also to $APPIMAGEDIR/etc/xdg
>
> Traced problem with KConfigPrivate::changeFilename() where it checks if
> the file path is absolute and when it fails it creates a new file. Hence,
> it then fails to read any contents. The resource type
> (GenericConfigLocation) doesn't appear to be used to find the absolute path
> of the file.
>
> How to resolve this issue?
>
> --
> Best Regards,
> Jasem Mutlaq
>
>


-- 
Best Regards,
Jasem Mutlaq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-windows/attachments/20160630/273e88fe/attachment.html>


More information about the Kde-windows mailing list