[Kde-games-devel] KMahjongg BoardEditor

Christian Krippendorf Coding at christian-krippendorf.de
Sun Jan 1 18:19:47 UTC 2012


Am Sonntag, 1. Januar 2012, 17:23:56 schrieb Albert Astals Cid:
> El Dissabte, 31 de desembre de 2011, a les 17:40:22, Christian Krippendorf
> va
> escriure:
> > Hey guys,
> 
> Hi
> 
> > related to the New Year beginning here tomorrow i got a little present
> > :P.
> > 
> > On the branch - branches/work/krippendorf-kdegames - i made the
> > BoardEditor working again. For me it is working like a charm.
> > 
> > Now please someone can test it and have a look at the code? So that this
> > code gets ready for commiting in trunk.
> 
> Some comments on the code
> 
> +    if (boardEditor != NULL) {
> +        delete boardEditor;
> +    }

Changed it...

> 
> You don't need the if, delete knows what to do with NULL pointers
> 
> 
> You need to increase the version of the kmahjonggui.rc file
> 
> 
> You have some unconsistencies in your spacing, i.e.
> +    drawFrame->setFocusPolicy( Qt::NoFocus );
> +    drawFrame->setMouseTracking(true);
> Spaces or not?
> 
> +       int nextY = borderTop + (y * tiles.qHeight());
> +    p.drawLine(borderLeft, nextY, borderLeft + (theBoard.m_width *
> tiles.qWidth()), nextY);
> Tabs vs spaces?

The unconsistencies in spacing exist cause of the original code. I have to 
change this later in the whole kmahjongg code, as the code don't has a 
consistent spacing in near any place of the program code.

> 
> 
> I have not done any functional testing, but since this is a new feature for
> 4.9 and 4.9 is 6 months away i think you can merge it right away after
> fixing the small things i mentioned since it will not break anything of the
> existing kmahjongg code.

Ok i will merge it.

> 
> Cheers,
>   Albert
> 
> > Thx to all... and all the best for the coming new year to all of you. :)
> 
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-games-devel
-- 
Mit freundlichen Grüßen / Best Regards

Christian Krippendorf


More information about the kde-games-devel mailing list