[Kde-games-devel] Data migration issue

David Faure faure at kde.org
Thu Mar 26 22:59:52 UTC 2015


On Monday 23 March 2015 00:25:14 Matthew Dawson wrote:
> On March 22, 2015 06:19:46 PM David Faure wrote:
> > But wait, this makes me realize another solution: kdelibs4configmigrator
> > could load the framework integration plugin, which would take care of
> > this, if installed.
> > 
> > Patch attached. Tested, at least to the extent that the slot is indeed
> > being called.
>
> I'm generally fine with this implementation, it seems like it would fix the
> problem.

I took this as a "ship it" and committed :-)

> I do have an alternate: would it be better to try and call into KConfig from
> KCoreAddons, iff both are loaded into the same process so that all
> KSharedConfigs could be reloaded after migration?  It creates a hidden
> dependency between them, but as long as it doesn't error out over while
> making the call, it shouldn't matter.  It would also handle the case the
> application isn't using frameworksintegration, but opened a KSharedConfig
> before.
> 
> My idea for calling across the libraries looks something like what I pushed
> here: git at git.kde.org:scratch/mdawson/kcoreaddons_talk_to_kconfig_base
> (hasn't propagated to the anon side yet).  Consider liblib1.so to be
> KConfig, and liblib2.so to be KCoreAddons.
> 
> dlsym isn't portable though, so this idea would need some work on Windows.
> I'm just not sure how to implement that simply without OS specific code. 

This sounds too hackish and fragile to me -- and not portable, as you noticed.

The application code is supposed to create a QApp first, then migrate config 
files, then load config.... that seems pretty clear to me, and not really an 
unexpected trap.
In fact the main risk I still see is for code that doesn't use 
Kdelibs4Migration at all but copies files on its own (it will then have the 
same issue, and will have to call reparseConfiguration), but that's nothing we 
can fix in Kdelibs4Migration itself.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 173 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20150326/d2bd5157/attachment.sig>


More information about the kde-games-devel mailing list