[Interest] Qt API annoyances: where to log/discuss?

Thiago Macieira thiago.macieira at intel.com
Tue Oct 30 20:23:03 CET 2018


On Tuesday, 30 October 2018 08:39:22 PDT Jason H wrote:
> I was wondering if there is a place to log annoyances/discuss with the Qt5
> API for fix in Qt6?

This list or the development mailing list are fine.

> 
> Two I am thinking of right now is:
> - QUrl::port() returns an int, but QTcpServer accepts a quint16, so no
> matter what I do, unless I add a cast, I get a warning. 

That's because QUrl::port() can return -1, indicating "no port was set in the 
URL". QTcpServer needs a valid port number. So the warning is correct and 
should be acted on.

> - Similarly with
> QImage::pixel there are signed/unsigned issues between pixel and qRgb().

Sounds like something to be fixed.

> Also, as I go between several languages, I find myself wanting to use
> lambdas more in a functional programming style. ( I would like a lambda for
> QImage::pixel ([] (x,y,pixelValue) { } ) (This one is neat because you can
> use scanline() transparently) Also for the various containers.

Highly inefficient, so unlikely to happen.

As for the containers, use <algorithm> and C++2a Ranges.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center






More information about the Interest mailing list