KNewStuff3 .knsrc file fails to load under Windows
Christoph Cullmann
cullmann at absint.com
Fri Jul 1 04:18:28 UTC 2016
Hi,
same answer as for icons: KConfig was patched by me to search inside resources, too.
Just bundle your file as resource, works for KTextEditor framework, avoids any file
lookups.
Greetings
Christoph
----- Am 30. Jun 2016 um 22:41 schrieb Jasem Mutlaq mutlaqja at ikarustech.com:
> 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
>
>
> _______________________________________________
> Kde-windows mailing list
> Kde-windows at kde.org
> https://mail.kde.org/mailman/listinfo/kde-windows
--
----------------------------- Dr.-Ing. Christoph Cullmann ---------
AbsInt Angewandte Informatik GmbH Email: cullmann at AbsInt.com
Science Park 1 Tel: +49-681-38360-22
66123 Saarbrücken Fax: +49-681-38360-20
GERMANY WWW: http://www.AbsInt.com
--------------------------------------------------------------------
Geschäftsführung: Dr.-Ing. Christian Ferdinand
Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234
More information about the Kde-windows
mailing list