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 _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest