On Tue, 20 Aug 2019 at 22:29, Matthew Woehlke wrote:
>
> On 17/08/2019 00.13, Sze Howe Koh wrote:
> > QLabel returns some CoW types by-pointer as a legacy from Qt 1 times [1]:
> >
> > QPixmap *QLabel::pixmap() const;
> > QPixture *QLabel::pixmap() const;
>
> Does this allow one to obtain
On 17/08/2019 00.13, Sze Howe Koh wrote:
> QLabel returns some CoW types by-pointer as a legacy from Qt 1 times [1]:
>
> QPixmap *QLabel::pixmap() const;
> QPixture *QLabel::pixmap() const;
Does this allow one to obtain the internal pixmap and modify it in-place
without then calling
Sze Howe Koh wrote:
> 3) Pick one of the options above, but go one step further and use
> std::optional (C++17) instead of returning null objects. I imagine this
> should apply more broadly to the whole of Qt, not just the functions
> discussed here.
IMHO, std::optional conceptually makes sense
On Sun, 18 Aug 2019 at 07:37, Mutz, Marc wrote:
>
> On 2019-08-17 07:13, Sze Howe Koh wrote:
> [...]
> > Which should we implement? I personally prefer (2) as it it can be
> > added to Qt 5.x and provides backward compatibility while keeping the
> > nice compact function names. We could enable
On 2019-08-17 07:13, Sze Howe Koh wrote:
[...]
Which should we implement? I personally prefer (2) as it it can be
added to Qt 5.x and provides backward compatibility while keeping the
nice compact function names. We could enable QT_NO_COW by default in
Qt 6.5 LTS and then remove the old function
QLabel returns some CoW types by-pointer as a legacy from Qt 1 times [1]:
QPixmap *QLabel::pixmap() const;
QPixture *QLabel::pixmap() const;
If you know of any other such API, please point them out!
Anyway, a few different ways have been proposed to modernize this API
[2][3][4],