[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: Re: Shared pointers and visitors
From: Casper Boemann <cbr () boemann ! dk>
Date: 2005-04-22 7:56:02
Message-ID: 200504220956.02906.cbr () boemann ! dk
[Download RAW message or body]
On Thursday 21 April 2005 20:45, Boudewijn Rempt wrote:
> On Thursday 21 April 2005 20:29, Casper Boemann wrote:
> > On Thursday 21 April 2005 20:27, Boudewijn Rempt wrote:
> > > On Thursday 21 April 2005 20:18, Casper Boemann wrote:
> > > > On Thursday 21 April 2005 19:46, Boudewijn Rempt wrote:
> > > > > Was there a good reason for not using the KisPaintDeviceSP but
> > > > > instead a plain pointer in the visitors? I truly don't remember
> > > > > anything about it, but if there's no good reason, I might convert
> > > > > the visitors to use it.
> > > >
> > > > well yes - it crashes
> > > >
> > > > Or rather the kisBackground crashes. The kisbackground constructor
> > > > uses an iterator to set the pattern, and when this pointer is
> > > > destroyed the background is destroyed, even before the constructor is
> > > > done.
> > >
> > > But the background is never zoomed, rotated or transformed, is it?
> >
> > No - what are you hinting at?
>
> If I remove the visitor tag from the rotate/scale/transform visitors, I'd
> like to make them use the KSharedPtr arguments instead of the plain
> pointers.
Oh sorry you wrote in the visitors not iterators
I don't know, but I don't think there were any specific problems.
However, and this is more general, I don't like the shared pointers. They lead
to all sorts of problems like the iterator/kisbackground I talked about. Or
that automatic casting is disabled (because it now has to go through two
castings and C++ doesn't do that)
I really feel it's a thing from hell. Either you have them built in like in
java or you don't. This half way of doing it is not good enough imho
--
best regards / venlig hilsen
Casper Boemann
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic