KSharedPtr changes

Michel Hermier michel.hermier at gmail.com
Mon Jan 16 20:13:30 GMT 2006


Hi,
I just commited the first patch (the part without explicit constructor).

It seems I have a quite good feed back, for making the shared pointer
constructor explicit.
To add a little more to arguments, TT also made the QSharedDataPointer
constructor explicit, so there must be good reasons to do so ;)
So if someone as a real stopper reason to don't make the constructor
explicit, say it before the next snapshot (should be on monday next week).
After the snapshoot I'll commit only the simple pointer convertions
(implicit cast from null, and broken constructor) of my patch. I will let
methods changes left to their maintainers (implicit cast of pointer
returning).

To explicit it, I will left conversion of:
QShared<Foo> bar() {
   Foo *foo = new Foo();
   return foo;
}

Because it can be converted as:
QShared<Foo> bar() {
   QShared<Foo> foo(new Foo());
   return foo;
}

or
QShared<Foo> bar() {
   Foo *foo = new Foo();
   return QShared<Foo>(foo);
}

So I let make the final decision to the maintainers.

Cheers,
    Michel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060116/fda82f70/attachment.htm>


More information about the kde-core-devel mailing list