[Kde-games-devel] Data migration issue

Mathias Kraus k.hias at gmx.de
Tue Mar 3 21:59:21 UTC 2015


Hi,

I noticed a problem with the data migration in the kdegames transition from kdelibs4 to kf5 and Albert Astals Cid suggested to ask frameworks devel for advice.

In short, when the migration is run after the QCoreApplication is created, the migrated config is not used but the default values. This results in a lost migration if the users changes some settings during the first run of the kf5 version of the game. Also, if the user plays a game and wins, all the previous high scores will be lost. Ian Wadham assumes there will be also other issues.

If the migration is run before the creation of the QCoreApplication, it seems to work correct.

Laurent Montel, the creator of kdelibs4configmigrator, suggests the former procedure (first QCoreApplication, then migration), though.

I'ne no knowledge about the kconfig internals and do not know the reason for this behaviour. Albert told me that QCoreApplication doesn't know anything about rc files, so it shouldn't make any difference. Could someone tell we what's wrong?

Regards,
Mathias

PS: I'm not subscribed to the list, please CC me

PPS: here is the conversation from kdegames devel

Am Montag, 2. März 2015, 22:21:06 schrieb Albert Astals Cid:
> El Dilluns, 2 de març de 2015, a les 22:05:09, Mathias Kraus va escriure:
> > Am Sonntag, 1. März 2015, 23:59:51 schrieb Albert Astals Cid:
> > > El Diumenge, 1 de març de 2015, a les 23:46:24, Mathias Kraus va escriure:
> > > > Am Montag, 2. März 2015, 09:00:07 schrieb Ian Wadham:
> > > > > Hi Mathias,
> > > > > 
> > > > > On 02/03/2015, at 5:24 AM, Mathias Kraus wrote:
> > > > > > I just tested the data migration of some games and noticed, that
> > > > > > they
> > > > > > have the same problem like granatier when QCoreApplication is
> > > > > > created
> > > > > > before the migration. The migrated config is not used at the first
> > > > > > application run, but the default settings. If a user then changes a
> > > > > > setting, the migrated settings will be lost.
> > > > > > 
> > > > > > While this is just a minor problem, because the settings can be
> > > > > > changed
> > > > > > again and it only happens if the user changes the setting at the
> > > > > > first
> > > > > > run of the application,>
> > > > > 
> > > > > I would say that most users would start changing settings if they find
> > > > > their settings are gone.
> > > > > 
> > > > > > there is another problem. The migrated high scores are also not
> > > > > > used.
> > > > > > This means, if a user plays a game and wins, the old high scores are
> > > > > > also lost.>
> > > > > 
> > > > > Also, other data files, such as the user's entire jigsaw puzzle
> > > > > collection
> > > > > in Palapeli, the saved solution-state of each puzzle, the saved state
> > > > > of
> > > > > a cube in Kubrick and any games or levels in KGoldrunner that are
> > > > > being
> > > > > composed or edited by the user --- to name a few.
> > > > > 
> > > > > > I think this is a big problem
> > > > > 
> > > > > Yes, it is a really serious problem, IMHO.
> > > > > 
> > > > > > and would suggest, to move the creation of QCoreApplication below
> > > > > > the
> > > > > > migration.>
> > > > > 
> > > > > Hope that works in all cases.  Well spotted, Mathias!
> > > > 
> > > > I assume QCoreApplication looks for the rc file and if it doesn't find
> > > > one,
> > > > it uses the default settings. As the migration is after the creation of
> > > > the
> > > > QCoreApplication, there is no rc file to use.
> > > > 
> > > > Could someone confirm my assumption?
> > > 
> > > No, QCoreApplication doesn't know anything about rc files, it has to be
> > > something else; i'm not saying the migration being done after/before
> > > QCoreApplication is not the trigger, i'm just saying that your theory
> > > can't be the reason.
> > > 
> > > Also it'd probably make sense for you to involve the kde-frameworks
> > > mailing
> > > list, more knowledgeable people about kconfig & friends live there.
> > 
> > Could someone try to reproduce this bevaviour? Just in case it's something
> > with my configuration. You can for example start the kdelibs4 version of
> > kmines, change the custom game settings, then start the kf5 based version
> > and check if the settings are the same as from the kdelibs4 version.
> 
> Confirmed (at least for the Theme)
> 
> Cheers,
>   Albert
> 
> > > Cheers,
> > > 
> > >   Albert
> > >   
> > > > > Cheers, Ian W.
> > > > > 
> > > > > _______________________________________________
> > > > > kde-games-devel mailing list
> > > > > kde-games-devel at kde.org
> > > > > https://mail.kde.org/mailman/listinfo/kde-games-devel
> > > > 
> > > > _______________________________________________
> > > > kde-games-devel mailing list
> > > > kde-games-devel at kde.org
> > > > https://mail.kde.org/mailman/listinfo/kde-games-devel
> > 
> > _______________________________________________
> > kde-games-devel mailing list
> > kde-games-devel at kde.org
> > https://mail.kde.org/mailman/listinfo/kde-games-devel
> 
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-games-devel
> 


More information about the kde-games-devel mailing list