Qt->glib main event loop patch (common main loop)

Thiago Macieira thiago at kde.org
Tue Nov 15 14:59:34 GMT 2005

Tobias Koenig wrote:
>> >Hmm, maybe we should distinguish here C and C++...
>> >QString and QObject are fine in C++, but when you want to develop
>> > plain C in a comfortable way, you need something like GLib. And yes,
>> > there are C applications in KDE (e.g. ksysguardd) which could profit
>> > from using a well tested library instead of using home brewed
>> > solutions.
>> True, but that still means those unnecessary C functions are in every
>> C++ program we run.
>Hmm, I thought the C compiler/linker ignores all C functions that aren't
> used by the application...

It would, if it were a static library.

Not so with a shared library. With one, you have a binary option: either 
you load it entirely to memory, or you don't load it at all.

Luckily, libglib.so is quite small (150k in my system). Besides, libstdc++ 
also duplicates many functionalities that QtCore provides and we're 
forced to load it as well (and it's 830k here).

So, in all, I'd say it's worth it.

  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

5. Swa he géanhwearf tó timbran, and hwonne he cóm, lá! Unix cwæð "Hello, 
World". Ǽfre ǽghwilc wæs glæd and seo woruld wæs fréo.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20051115/69f38d94/attachment.sig>

More information about the kde-core-devel mailing list