[Kde-games-devel] Re: multiple menu entries in Boson 0.9.1

Andreas Beckermann b_mann at gmx.de
Wed Nov 26 20:40:41 CET 2003


On Wednesday 26 November 2003 19:14, Raphael Langerhorst wrote:
> Hello!
>
> concerns: Boson 0.9.1
>
> I'm currently tracking down the problem you get when you...
> 1) start a new game
> 2) "end game"
> 3) start another new game
>  -> you have multiple menu entries of all KAction menu entries that are
> initialized in ... let me see ... BosonWidget::initKActions() (gets called
> from BosonWidgetBase::init())

Yeps. We know that already :(
(btw: cc'ing boson-devel)

> A)
> What I propose is to get rid of these KActions when ending a game - in the
> destructor, but how can these be referenced?

The KActions are children of the actionCollection(), which is inherited from 
KXMLGUIClient, which deletes the actionCollection() on destruction.
Since the KActions are QObjects, they are deleted as well on destruction.
The KActions are unfortunately not the problem, as far as I can see.

> B)
> Especially those KStdGameAction actions, which are seen multiple times in
> the menu when starting more games without quiting boson in between (see
> above).

KStdGameActions are just KActions as well (see KStdGameAction::create()).

> C)
> And what about all those other actions that are not as visible as menu
> entries? Do they also continue to live after "End Game" from the menu has
> been selected? 

Do you mean the actions that are meant to be accessible from the keyboard only 
(such as unitgroups) ?
Well, the actions are defined by their KAction objects, so they are deleted on 
destruction. It's just the menu entries that are buggy.

> (I have not yet figured out if BosonWidget is destroyed when
> end game is selected)

Yes it is.

> Well, it's my first contact with boson source code, since the game already
> makes a great impression on me !! (congratulations) and this is something
> that can be amended and ... maybe it's not too hard for the beginning. Any
> help is of course welcome, since I don't have that plenty amount of time.

Umm. Well I'd be very happy if someone would manage to fix this problem, as 
this is probably the only bug I know of that I tried to fix but failed 
totally. It goes pretty deep into KDE GUI merging design (which is mostly 
undocumented).

Here is a mail describing the "start" of this problem:
http://lists.kde.org/?l=kde-devel&m=102830527330132&w=2
I have never found out how to use GUI merging correctly.

> greetings,
> Raphael

CU
Andi



More information about the kde-games-devel mailing list