New BinReloc patch

Arend van Beelen jr. arend at auton.nl
Mon Apr 19 22:18:13 BST 2004


On Monday 19 April 2004 23:06, you wrote:
[...]
> I think there is a bit of misunderstanding. I'm not against these
> functions, I I am against having these functions as part of the API. The
> KStandardDirs constructor can just call them and for that they don't need
> to be part of the API.
I'm glad to hear that :)
The functions being part of the API isn't the most important of it, but they 
are necessary for use from libraries. If a library wants to use this 
functionality, the library _itself_ has to add its prefix to KStandardDirs 
and it needs an API call to do that (which is addPrefix()) but it also needs 
to actually know its own prefix, for which it can then use libraryPrefix().

This means all libraries that wish to use this functionality need to call 
KGlobal::dirs()->addPrefix(KStandardDirs::libraryPrefix()). It is important 
this call is done from the library that wishes to use it as libraryPrefix() 
has a default argument which is then filled in by the calling library. The 
symbol that's filled in is used internally by libraryPrefix() to find out 
which library called it and it can then resolve its path.

So, that's what libraryPrefix() is useful for, the others are mostly for 
completeness.

Greets,
Arend jr.

-- 
Arend van Beelen jr.
http://www.liacs.nl/~dvbeelen

It's a wonderful life - if you can find it.
-- Nick Cave & The Bad Seeds




More information about the kde-core-devel mailing list