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

Thiago Macieira thiago.macieira at intel.com
Wed Oct 31 20:42:02 CET 2018


On Wednesday, 31 October 2018 10:35:15 PDT Jason H wrote:
> > 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.
> 
> I thought QUrl::port() can take a default port if not set. Does it need to
> be able to return negative?

Since the argument is int, yes.

I can add a quint16 overload, so it returns quint16 too, but I can't remove 
the int overload right now. Change subject to whether this would cause 
ambiguous overloads.

But if it works, we can deprecate the int overload now and think of removing 
it for Qt 6.

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






More information about the Interest mailing list