[Kde-games-devel] Data migration issue
David Faure
faure at kde.org
Sat Mar 21 13:06:03 UTC 2015
On Saturday 21 March 2015 10:16:07 Mathias Kraus wrote:
> Am Samstag, 7. März 2015, 14:43:14 schrieb laurent Montel:
> > Le Saturday 07 March 2015 13:47:13 David Faure a écrit :
> > > > KdePlatformTheme::loadSetting
> > >
> > > This code runs before the application name is set, but the fallback to
> > > argv[0] should still work. [This makes me realize that we should call
> > > QCoreApplication::setApplicationName before creating the application
> > > instance, everywhere.].
> > >
> > > > This function caches that instance of
> > > >
> > > > KSharedConfig, which is working ontop of an empty file and thus does
> > > > nothing.
> > >
> > > Right. But that's exactly what reparseConfiguration() should fix, the
> > > case
> > > where the file on disk was changed.
> > > Indeed, given that the migrator code is in kcoreaddons, it can't do it
> > > automatically. (On hindsight, maybe the config migrator should have been
> > > in
> > > KConfig...)
> > >
> > > I'm surprised that Laurent didn't hit this issue though?
> >
> > No I never see it, and nobody reported it before that.
> > So what is the fix that I need to do ?
>
> The release is approaching really fast. We need a solution. What's wrong
> with the migration before QCoreApplication creation? As far as I can see,
> it's a plain copy from the old location to the new one.
Before QCoreApplication creation, toLocal8Bit / QFile::encodeName can be
wrong. Thiago has said many times that you're not supposed to use any Qt API
before QCoreApplication exists.
>From this discussion it seems to me that a reparseConfiguration in the right
place would do.
But can we get a more complete bug report than "it doesn't work"?
How do we reproduce this exactly?
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
More information about the Kde-frameworks-devel
mailing list