[HELP] KParts::StatusBarExtension and KParts::ReadOnlyPart::guiActivateEvent()

Christian Loose christian.loose at hamburg.de
Fri May 9 20:37:46 BST 2003


Am Freitag, 9. Mai 2003 02:27 schrieb Simon Hausmann:
> On Thu, May 08, 2003 at 10:17:18PM +0200, Christian Loose wrote:
> > Hi everybody,
> >
> > I have a problem with Cervisia.
> >
> > I would like to change the state of the menu items when the CervisiaPart
> > gets activated for the first time (with KXMLGUIClient::stateChanged()).
> > So I overwrote the guiActivateEvent() method, but it never gets called!
> >
> > After some debugging I came up with the following:
> >
> > - KParts::MainWindow::createGUI() sends the GUIActivateEvent()
> > - QObject::event() receives the event and tries the event filters first
> > - KParts::StatusBarExtension::eventFilter() is called and consumes the
> > event
> >
> > I created the StatusBarExtension in CervisiaPart's constructor.
> >
> > What am I doing wrong? Do I have to create the StatusBarExtension after I
> > received the GUIActivateEvent()? Why does the StatusBarExtension consume
> > the event?
>
> That was clearly a bug. That event filter should not consume the
> event. Should be fixed now.

Thanks a lot. It works like a charm now.

Christian




More information about the kde-core-devel mailing list