[Kde-games-devel] Port of KMahjongg
Christian Krippendorf
Coding at christian-krippendorf.de
Sat Aug 11 05:52:43 UTC 2012
Am Mittwoch, 1. August 2012, 20:09:46 schrieb Albert Astals Cid:
> El Diumenge, 22 de juliol de 2012, a les 21:47:14, Christian Krippendorf va
>
> escriure:
> > Hey guys,
>
> Let me be the evil guy, what's the benefit of this port?
Not using some deprecated stuff enymore like KGameCanvas?
BTW: There is nothing evil to tell me what is bad, how to learn otherwise. :-)
>
> > the port of kmahjongg is now done in many ways. Just few bugs are out
> > there, but that should be solved quickly for me. My question now
> > following:
> >
> > Can please anyone review my code out of the design? This is my first
> > port to QGraphics-Framework and i'm really not sure if i had done all
> > design things right. Maybe some functionallity should be in another
> > class etc. etc. Just code design things.
> >
> > The branch is branches/work/krippendorf the mainly affected files are:
> >
> > GameItem.h/cpp - QGraphicsItem
> > GameView.h/cpp - QGraphicsView
> > GameScene.h/cpp - QGraphicsScene
>
> public QObject, public QGraphicsItem
> you probably want just
> public QGraphicsObject
>
> The main design problem i see is the typical one in which you make your Item
> also be your Model, i.e. you are storing the gridpos in GameItem that is
> both your "logical" model and your "phisical" representation (the
> QGraphicsItem), usually it is better to have this separated, so you can
> throw away QGraphicsItem and put there MegaCoolStuff without having to
> change your model. Not sure if i'm making sense here.
Yearh sounds right. I will have a look of seperating the data and the view
more. Thanks!
>
> > Cause before i finished, i would have a short feedback. Surely cause of
> > code style and some bugs i will start a code review on the review board
> > later. This should just be a short and simple code design question.
> >
> > I hope i filled up the right classes with the right functionality :-).
>
> I know you asked for "code design" stuff, but after installing kmhajongg
> from your branch all i get is an empty gray box that crashes when i press
> the "new" toolbar button.
[christian at christian-desktop krippendorf]$ svn info
Pfad: .
Working Copy Root Path: /home/christian/Develop/KDE/krippendorf
URL: svn+ssh://svn.kde.org/home/kde/branches/work/krippendorf
Basis des Projektarchivs: svn+ssh://svn.kde.org/home/kde
Revision: 1310174
Letzte geänderte Rev: 1306531
Letztes Änderungsdatum: 2012-07-19 15:16:41 +0200 (Do, 19. Jul 2012)
KDE Version 4.8.3 - ArchLinux
I do a clean build and all works fine without any crashes. Maybe u find the time
to give me more informations about that.
Sorry for answering takes so much time.
>
> Cheers,
> Albert
>
> > Thx in advance. Greedings.
>
> _______________________________________________
> 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