Plugin Toolbar problem

Kevin Krammer kevin.krammer at gmx.at
Thu Jun 10 20:01:32 BST 2004


Hi all!

Many of you have very likely already seen that the rellinks plugin's toolbar 
appears for a short moment, even when the toolbar setting is "never".

I tried to work around it but I got into some kind of dead end.

I thought that I could just put an event filter into the view (or toolbar) to 
get the showEvent and then hide the toolbar (or filter the show event 
respectively).

Problem is that neither view nor toolbar are accessible from the plugin's 
contructor, the pointers are != 0 but not valid.

Delaying the event filter install using a single shot timer works, but then it 
misses the first show(), so this does not work either.

I looked through the code in  khtml_part.cpp and I think the problem is that 
the plugins are loaded by the setInstance() call, which happens to be before 
the call to init(), thus the d pointer is not set yet and methods like 
KHTMLPart::view() segfault.

I am not experienced enought with the KPart stuff, but maybe the plugin 
loading can be delayed to the end of init()?
Something like calling setInstance with false as the second parameter's value 
and calling loadPlugins() as the last command of init()

Cheers,
Kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20040610/563619ee/attachment.sig>


More information about the kfm-devel mailing list