[Kst] Re: branches/work/kst/portto4-sharedpointer
Peter Kümmel
syntheticpp at gmx.net
Wed Jan 5 22:58:01 CET 2011
On 05.01.2011 16:52, nicolas.brisset at free.fr wrote:
> Hi Peter,
>
> I am wondering what this exactly means. Are you going to pursue the QSharedPointer "cleanup" further, or is it too big a change / not worth it?
Hi Nicolas,
happy new year, too!
I've tried to switch completely to an external refence counting but this is to complicated because
everywhere where toSharedPtr() is used we would have to change the code. So we still need Shared.
But I wanna use QSharedPointer for our implementation because it is thread-safe.
Attached my new sharedptr.h. With help of QWeakPointer we could switch between
raw pointer and shared pointer.
>
> Another, unrelated point: could you have a look at the patch I posted a while ago for the color per file dialog. It has not been committed yet, and I'd like to get it in before we forget. I don't know if making the "color per file" option persistent is worth it, but at least this patch is necessary, as it prevents assigned colors from changing each time the dialog is shown.
I will have a look at hit.
Peter
>
> Thanks and happy new year to all,
>
> Nicolas
> ----- "Peter Kümmel" <syntheticpp at gmx.net> a écrit :
>
>> For the records the patch.
>>
>> Shared and raw pointers are so intermixed that using an external
>> reference count for the shared pointer would lead to a huge
>> change in the APIs when toSharedPtr() should be removed.
>>
>> At least I've found the implementation for Object::toSharedPtr()
>> which maybe also helps with the current solution.
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sharedptr.h
Url: http://mail.kde.org/pipermail/kst/attachments/20110105/90a787fb/attachment.bat
More information about the Kst
mailing list