[Development] Why does QLabel::pixmap() return `const QPixmap*`?
Sze Howe Koh
szehowe.koh at gmail.com
Mon Jan 5 13:20:25 CET 2015
On 2 December 2014 at 07:37, Sze Howe Koh <szehowe.koh at gmail.com> wrote:
>
> On 1 December 2014 at 16:00, Thiago Macieira <thiago.macieira at intel.com> wrote:
> > On Monday 01 December 2014 07:40:50 Knoll Lars wrote:
> >> Exactly that. It’s been like that since Qt 1 times, where QPixmap was a
> >> non shared class you had to instantiate on the heap. We never changed this
> >> accessor for source compatibility reasons (I remember discussing this with
> >> Matthias when we moved from Qt 3 to Qt 4 ), but I agree it feels very
> >> wrong these days to return a pointer to a pixmap.
> >
> > Add a QPixmap::labelPixmap() const; and deprecate the old.
>
> Done for the pixmap and picture API: https://codereview.qt-project.org/101233/
>
> Is it worth changing the internal implementation as well?
> QLabelPrivate stores QImage, QPicture, and QPixmap pointers.
Hi,
Could someone review these, please?
https://codereview.qt-project.org/101233
https://codereview.qt-project.org/101512
Regards,
Sze-Howe
More information about the Development
mailing list