[Development] fixing name of QNetworkAccessManager::createRequest
Thiago Macieira
thiago.macieira at intel.com
Fri Jan 13 13:04:24 CET 2012
On Friday, 13 de January de 2012 08.14.41, Peter Kuemmel wrote:
> > Well, having method createX which creates Y doesn't sound good to me
> > either.
>
> Yes, this is worse than a binary-only bug.
>
> I don't know the policy for API changes for Qt 5.0,
> but when such a thing couldn't be fixed, nothing else
> is worth braking source code compatibility.
>
> I would fix it because it is super simple to create
> a script which simply replaces all the relevant strings
> in the source files.
It's very easy to update the sources once you know that you have to. The
problem is that the script might replace things it shouldn't. "createRequest"
is not an exclusive name of QNetworkAccessManager and it might appear
elsewhere. The changes we have accepted are either for the greater good or
because they can be easily automated with very little mistake (like
#includes).
What's more, this is a change very hard to track down because it does not
create a compiler error if you forget to change your sources. It's a case of
silent bugs creeping in.
So, changing the name of this function is:
- of little practical benefit
- not 100% automatable without a code scanner
- dangerous, as it creates silent bugs
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120113/e3cfcf5c/attachment.sig>
More information about the Development
mailing list