sharing code between kjs and khtml

David Faure faure at kde.org
Mon Jul 25 12:40:58 BST 2005


On Monday 25 July 2005 03:35, Maciej Stachowiak wrote:
> 2) Dump in kjs and export for use in khtml, even though this stuff  
> has basically nothing to do with a JavaScript API.

I would use this approach for now (but maybe kdom will change
the overall design later on).

> 3) Make a new module that both kjs and khtml depend on ("kxmlcore"?  
> "kxmlbase"? something like that...).

It doesn't make much sense for KDE code in general to have a requirement
of "no dependency on kde nor qt". This is quite specific to kjs. So anything
else that is no-kde & no-qt and for use by kjs and khtml only, makes some sense
in kjs, dependency-wise - since kjs is the basis for (parts of) khtml.

If more kde apps want to use those classes then we would have to copy them
(like we copied some of krfcdate) - kjs can't use kdecore and vice-versa, so no
proper solution there. A new lib just for that sounds overkill...

Well, this was for the hashtables. Depending on what the assert macros look
like, the best place for them in the kdelibs could be kdecore/kdemacros.h
(or a new header); if they are independent from kjs and khtml, and if it makes
sense to use them in more than kjs and khtml. Can you show more details about
what those assert macros look like?

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).





More information about the kfm-devel mailing list