[Kde-games-devel] Bugs (showstoppers?) in KGoldrunner

Ian Wadham ianw2 at optusnet.com.au
Thu Nov 29 05:37:41 CET 2007


On Thu, 29 Nov 2007 05:26 am, Luciano Montanaro wrote:
> I find that kgoldrunner crashes on startup on my development
> laptop. It seems to work on the desktop, when I installed the packages,
> however I can't see why.
>
> The line
>   if (success && (resizeCount > 0)) { // If startup, do not render or paint
>
> in kgrcanvas.cpp, changeTheme function seem to be the responsible for
> this. If I remove the resizeCount check, the program starts up and works
> correctly.
>
That line is there to prevent SVG rendering happening until the size
of the central widget is finally known, which is not until after
TWO resize events.  I thought it was worth doing the theme's SVG load
during the startup sequence, to spread the overhead around a bit, rather
than having it all concentrated in the resize event.  The rendering o'head
is huge on some themes now, so I would not like to render prematurely 
and uselessly, as would happen if that check were removed.

Luciano, the code works for me and perhaps for everybody else.
It has been in KGoldrunner for several months now ...

> The problem is that in the kgrplayground setTile() method, the m_tileset
> seem to be null, and the m_tileSprites list seem to be empty, so the
> drawTheScene() method in kgrcanvas should really be called before the
> game initialization proceeds.
>
The pixmap lists will be null until resize time.  drawTheScene() renders them.

> The other problem is less critical, but annoying. Many keyboard shortcuts
> do not seem to work for me. The Esc or p keys do not, for sure, but there
> are others.
>
I have had a lot of trouble with this, going back over a year, I think.  The
problems have come from the shortcut-handling functions moving from
KDE to Qt libs and the Configure Shortcuts dialog being re-written.  Your
particular problem is probably because the syntax for alternate shortcuts
has changed.  You now need, for example:

    <Action shortcut="P; Escape"  name="game_pause" />

in the ui.rc file.  Note the *space* after the semi-colon.  If you delete
(or edit) the ui.rc file down in ~/.kde, the shortcuts might come right.
The SVN copy of the kgoldrunnerui.rc file has the correct syntax.

> Fortunately the digging and movement shortcuts work, at least.
>
Heh, you must be a masochist, Luciano ... :-)  Don't you use the mouse?

All the best, Ian W.



More information about the kde-games-devel mailing list