move QCoreApplication::addLibraryPath call from KApplication to KComponentData

Thiago Macieira thiago at
Thu Nov 13 07:37:40 GMT 2008

Maksim Orlovich wrote:
>> You can use a mutex to ensure that only one initialisation happens
>> and, if any
>> other threads enter that code path, they will wait for the
>> initialisation to
>> finish.
>> That's what a function-local static does in gcc:
>> 	static bool initialised = lazyInit();
>kdelibs is built with -fno-threadsafe-statics, though; doesn't it
> disable this?

We removed that flag because it caused gcc to miscompile, have we added it 

In any case, I meant that as an example. It shouldn't be used because 
other compilers do not have thread-safe statics.

  Thiago Macieira  -  thiago (AT) - thiago (AT)
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list