Review Request 124034: Fixes an issue where the installed kritarc is not used

Victor Wåhlström kdebugs at draconic-illusion.com
Sun Jun 7 20:43:07 BST 2015



> On June 7, 2015, 5:23 p.m., Friedrich W. H. Kossebau wrote:
> > krita/ui/KisApplication.cpp, line 151
> > <https://git.reviewboard.kde.org/r/124034/diff/1/?file=379100#file379100line151>
> >
> >     Makes me wonder if this should not be rather done by ` KoGlobal::initialize()` as well.
> >     
> >     Possibly all other apps have the same problem (incl. Krita Sketch/Gemini)

I'm a bit wary about moving this. If I move this to KoGlobal's constructor it will work, but it also creates a soft dependency on KGlobal::config(). If I move it, then a call to KoGlobal::initialize() will modify KGlobal::config(). Specifically it will drop all unsaved configuration options and reload from disk. In most cases this is completely fine, but do we want that kind of changed behaviour? How many programs does KoGlobal affect, and how do we make sure this change doesn't introduce subtle bugs?

Ideally this sort of code should be in KGlobal, should only update unset variables found in new files, and should be done when a path is added to KGlobal::dirs(), but I'd rather not fiddle with KDE core libs.

If enough people vote for moving it I'll move it, but I can only test it with Krita.


- Victor


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124034/#review81298
-----------------------------------------------------------


On June 7, 2015, 4:58 p.m., Victor Wåhlström wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124034/
> -----------------------------------------------------------
> 
> (Updated June 7, 2015, 4:58 p.m.)
> 
> 
> Review request for Calligra.
> 
> 
> Repository: calligra
> 
> 
> Description
> -------
> 
> For some reason KGlobal::config() is constructed before all paths have been added. This results in fallback kritarc files not being parsed at startup. Side effects include bad initial UI layout, and blacklisted tools showing up in the toolbox. This patch forces KGlobal::config() to reconsider all config files on disk after paths have been added.
> 
> 
> Diffs
> -----
> 
>   krita/ui/KisApplication.cpp 6b83573 
> 
> Diff: https://git.reviewboard.kde.org/r/124034/diff/
> 
> 
> Testing
> -------
> 
> Tests done on Kubuntu 15.04
> 
> Closed Krita, removed user version of kritarc (~/.kde/share/config/kritarc), started Krita without the patch, observed bad layout and tools which shouldn't be in the toolbox.
> 
> Closed Krita, removed user version of kritarc (~/.kde/share/config/kritarc), started Krita with the patch, observed good default layout and expected tools in toolbox.
> 
> 
> Thanks,
> 
> Victor Wåhlström
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20150607/b1709513/attachment.htm>


More information about the calligra-devel mailing list