[Development] Source break policy for function overloads

Ola Røer Thorsen ola at silentwings.no
Wed Jul 13 16:45:05 CEST 2016


2016-07-13 16:30 GMT+02:00 Simon Hausmann <Simon.Hausmann at qt.io>:

>
> It all comes down to the question: What impression do we want to give
> people when they upgrade to
>
> a newer version of Qt?
>
>
>
In my experience, I first had problems with this when I converted to the
new "connect" syntax some years ago and hit the overloaded "error"
functions in QAbstractSocket where just one of them is a signal. It cost me
quite some time figuring out how to solve that, ending with getting help on
the interest mailing list. If qOverload would have existed back then, I
would not have known that I should or could use that either.

So if similar problems appear when upgrading Qt because of added
functionality it will cost developers a lot of time. The compiler error
will probably not point to a suggested solution like "use qOverload" or
"use
static_cast<void(QTcpSocket::*)(QAbstractSocket::SocketError)>(&QTcpSocket::error)"
instead.

In my opinion, please try to avoid these overloads as much as possible.

Cheers,
Ola
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160713/41ab289a/attachment.html>


More information about the Development mailing list