[Kde-games-devel] [Patch] Automatically fills in the user name in the high score dialogue.

Albert Astals Cid aacid at kde.org
Mon Dec 24 18:36:10 CET 2007


A Dilluns 24 Desembre 2007, David Edmundson va escriure:
> On Sunday 23 December 2007 22:25:18 you wrote:
> > A Diumenge 23 Desembre 2007, David Edmundson va escriure:
> > > When playing KNetwalk I found having to enter my name each time quite
> > > annoying.
> > >
> > > Attached is a patch that populates the edit box with the user's name
> > > from their account details. It still allows the user to edit before
> > > saving.This affects the highscore dialogue for all games.
> > >
> > > I don't have SVN access, as I'm still fairly new to the whole KDE
> > > development experience, so I've attached the patch needed for
> > > kscoredialog.cpp which someone in charge can decide wether to accept
> > > and submit it.
> >
> > Hi David, thanks for the patch, a few comments below:
> >  * You are a bit late, we are in feature freeze and i doubt this can be
> > considered a bugfix so unfortunately this will have to wait for KDE 4.1
>
> Sorry I thought it meant no more API changes, my bad. Does this mean in 18
> days it could be submitted?

Probably a bit later, yes, but won't be released until KDE 4.1, not with KDE 
4.0.1

>
> >  * It would be cool if you could improve the patch to have this
> > behaviour:
> >
> >    - Always use the last used name
>
> The date isn't stored in the config file, so it can't work out what was
> last. 

Yes you can, just store the last used name in KConfig :D

> Personally I think it should store the date also, that way we can 
> display how when records were set to the user. Seeing "Set 2 days ago" I
> think would be quite handy.

Right, that would be interesting too.

>
> >    - If last used name get the name from KUser::FullName
> >  * KUser user= KUser(); should be really only be KUser user;
> >  * Watch out the style:
> >    - You are using tabs while the original file uses spaces.
> >    - Your = spacing is inconsistent with itself (different in two
> > different places) and different with the one used in the original file
> >    - As a general rule for KDE always follow the style of the file you
> > are editing.
> >    - Also you added an empty line before the connect that seems to be non
> > needed
>
> I was spacing it all out to be easier to read and understand the code, I
> just forgot to put it all back when I was submitting the patch.
>
> > Thanks and welcome to the KDE world :-)
>
> I'm clearly not quite there yet! Thanks for all the advice, will bear it
> all in mind for the hopefully numerous patches/changes in future.

Good, i understand you are going to work on the date enhacements?

And BTW you forgot to CC the mailing list!

Albert

>
> > Albert




More information about the kde-games-devel mailing list