[Kde-games-devel] KMahjongg BoardEditor

Albert Astals Cid aacid at kde.org
Sun Jan 1 16:23:56 UTC 2012


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;
+    }

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?


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.

Cheers,
  Albert

> 
> Thx to all... and all the best for the coming new year to all of you. :)


More information about the kde-games-devel mailing list