[Kde-games-devel] KMahjongg archaeology
Roney Gomes
roney477 at gmail.com
Wed Jan 21 12:19:33 UTC 2015
2015-01-21 7:55 GMT-03:00 Ian Wadham <iandw.au at gmail.com>:
> On 21/01/2015, at 2:17 PM, Roney Gomes wrote:
>> Good news comrades!
>>
>> Today I gave our first step towards porting the QGraphicsView version
>> of KMahjongg to Frameworks. I decided to begin by rebasing 'qgraphic'
>> to frameworks' current HEAD then proceed solving the inevitable
>> conflicts as they arrived.
>
> The plan was to merge master into qgraphic first, and then merge qgraphic
> into frameworks when we are happy with it, IIRC.
That's not what I understood. I thought we were prioritizing
frameworks since the changes it introduced were bigger when compared
to qgraphic and merging it first would probably reduce the amount of
conflicts in the future.
>> The history is now looking as if Christian
>> started working after the KF5 porting was done.
>
> Huh? How can this be? Christian did his work years ago.
That's possible with git rebase. It does what the name implies, that
is, rebases the current branch to a commit -- or the last commit of a
given branch -- and reapply all of your commits again pausing the
process every time a conflict is found.
I decided to follow that strategy since it simplifies the reviewing
process (as the history is no longer a mess of intertwined commits)
and reduces considerably the amount of merging conflicts.
If you have the time, consider reading:
https://www.atlassian.com/git/tutorials/merging-vs-rebasing/workflow-walkthrough
>> I just fixed the last compilation error and now we have a running
>> version of KMahjongg under Frameworks. Still untested as I didn't have
>> the time to look for eventual bugs. That's just the first step though,
>> we still need to see what Christian left pending and what pieces of
>> code are using the old API's.
>
> Yes, we do.
>
> Well I have been reading the QGraphics code, before merging master into
> it as originally planned. And there are a few problems…
>
> A simple one is that part of the game's Editor is still using KGameCanvas
> and part is using QGraphicsView. They seem to co-exist OK, but the problem
> should be easy to fix anyway.
>
> More seriously, the factoring of control, scene, view, model and engine
> (e.g. puzzle generator) is questionable, IMHO.
>
> The code for the GameView class is very large and contains several things
> that really belong in the model and engine (GameData and BoardLayout
> classes) and maybe some things that belong in a control class. Also there
> seem to be many things that really belong in the GameScene class, not
> the view.
>
> The code itself reads as *correct* for performing the required functions and it
> certainly runs correctly so far, though I have not yet done exhaustive testing.
>
> The endlessly repeating redo-undo animation at the end of a won game is
> intentional, not a bug, but the current version of the game does it once only.
>
> So I am wondering what is the best thing to do. We do not have anyone
> who can refactor the code at present. That would be a large job and
> might introduce new bugs. OTOH if it stays as is, maintainability could be
> affected. KMahjongg is a VERY mature product, so I do not see a big need
> for maintenance in the future, apart from Jan-Peter Nilsson's bug fixes. But
> perhaps someone will want to port it to QML 2(?).
>
> So I think the best thing would be to merge master into qgraphic as planned,
> test and fix the qgraphic branch as it stands (with no re-factoring), introduce
> Jan-Peter's fixes and finally merge into the frameworks branch as planned.
I don't think merging master after frameworks is going to be a
problem. Changes introduced by Jan-Peter were not so big therefore
applying them later won't be that problematic.
Actually, the main reason for me to merge frameworks first is that my
current development setup is KF5 entirely, so I decided to avoid all
the headache involved in setting up a KDE 4.x environment. But that's
something personal, I was just avoiding extra work -- it took me two
days to build KF5 so I got a bit traumatized. :-)
> I would be happy to continue doing all that over the next few weeks. Maybe
> Roney and I can share this work.
Will be that possible? I thought you still couldn't run KF5 software
in your Apple setup. If that's really the case then we could do as you
suggested and work together on finishing the Graphics View port before
merging frameworks.
> We would be left with a situation where, if anybody wants to port KMahjongg
> to QML in the future, then they might have to do some re-factoring first… But
> at least the game would not be using an obsolete graphics library and would
> perform much better --- as well as becoming available with KF5.
>
>> However, there's a problem: I cannot submit my work. As rebasing
>> rewrites history and I'm not KMahjongg's project manager I cannot
>> "push force" my changes nor set up a new branch. So I'm stuck for now,
>> what do you suggest?
>
> Let's deal with merging into frameworks down the track a way.
Could you explain that, please? I really couldn't understand that
expression -- don't know whether it's a positive or negative
assertion.
Cheers.
--
Roney
More information about the kde-games-devel
mailing list