Re: KDE, Qt3 and Amarok
- Date: Tue, 22 Apr 2008 08:17:06 +0200
- From: "Bart Van Assche" <bart.vanassche@xxxxxxxxx>
- Subject: Re: KDE, Qt3 and Amarok
On Mon, Apr 21, 2008 at 10:55 AM, Thiago Macieira <thiago@xxxxxxx> wrote:
>
> Bart Van Assche wrote:
> >On Mon, Apr 21, 2008 at 10:39 AM, Thiago Macieira <thiago@xxxxxxx> wrote:
> >> Then it seems QString is not reentrant in Qt 3 as the documentation
> >> says.
> >
> >Should I file a bug report for this ?
>
> No. It's pointless since Qt 3 has reached end-of-life.
>
> You can come up with the patch on your own and add to the Qt 3 qt-copy, in
> the KDE servers. And hope that distributions remember to rebuild and
> apply the patch in their next releases.
>
> Also note that switching from a simple increment to an atomic one is a
> performance penalty that could be considerable for Qt 3 / KDE 3
> applications.
>
> As for locking, it is defintely a bad, bad idea.
Do you know where I can find more information about the portability
requirements for Qt 3 patches for KDE ? Is it allowed to use gcc
extensions ? And are other threading libraries than POSIX threads
supported ?
I see two ways to fix this: either change the reference count
manipulations from ordinary increment / decrement to atomic ones, or
let each thread allocate its own instance of sharedNull and use a
thread-local variable to store a pointer to it. The difficulty with
this last solution is making sure that this variable is cleaned up at
thread termination time.
Bart.
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<