[Patch] implement SqlMeta::updateImage()

Seb Ruiz ruiz at kde.org
Mon Nov 19 11:08:09 CET 2007


On 19/11/2007, Maximilian Kossick <mkossick at gmx.de> wrote:
> On Monday 19 November 2007, Dan Meltzer wrote:
> > Yo,
> >
> > I got around to porting to covermanager today, only to find out that
> > the code wasn't around yet to set an image for an album.  I put
> > together this patch to do so.  It basically just copies the code from
> > findAmazonAlbum except ends by saving instead of by loading.  I chose
> > a QPixmap instead of a QImage as the parameter mostly by random,
> > though it seemed to be more common to deal with.
> >
> > It seems to me it would also make sense to rename updateImage() to
> > setImage().. any thoughts on that?  Also, should updateImage generate
> > the cached file or should that be up to the image loader?
> >
> > Dan,
>
> A QImage makes more sense here, because we are not going to show the image
> that we pass to updateImage on the screen in that method.

Yes, also QPixmap is neither threadsafe nor reentrant. QImage is much
safer to use.

>
> I agree to renaming updateImage. I have no idea why I chose updateImage, but
> setImage is a better name.
>
> _______________________________________________
> Amarok-devel mailing list
> Amarok-devel at kde.org
> https://mail.kde.org/mailman/listinfo/amarok-devel
>
>
>


-- 
Seb Ruiz

http://www.sebruiz.net/


More information about the Amarok-devel mailing list