DOM::Node extension

Josef Weidendorfer Josef.Weidendorfer at gmx.de
Fri Apr 11 20:45:11 BST 2003


On Saturday 12 April 2003 15:36, Deschildre Nicolas wrote:
> hi!
> I'm currently working on the kafkapart (the WYSIWYG editor) for Quanta
> and i would like to submit you a change in khtml: In the kafkapart,
> extra information is needed for each DOM::Node to handle the events, and
> when an event is raised, the only way i have to get theses extra
> informations is to look the quanta node(where the extra infos are
> stored) one after one to see if it is the corresponding quanta node.
> [...]
> Any comments?

Hi!

I can't decide this, but some comments...
If you add a pointer to DOM::Node, make it a QGuardedPtr to never ever get any 
dangling pointers.

> I can do and commit this, but first, isn't there one simpler way to do
> this that i've missed?

Use a hash table (QPtrDict<QuantaNode>) for the lookup of the quanta node 
instead a linear search.

Josef


> ++
> Nicolas
>
> _____________________________________________________________________
> Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
> http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France





More information about the kfm-devel mailing list