[Development] Ideas for adding an argument with default value to a virtual method
Thiago Macieira
thiago.macieira at intel.com
Tue Jan 24 23:36:53 CET 2012
On Tuesday, 24 de January de 2012 22.45.54, Stephen Kelly wrote:
> I think it makes sense, but that is an often used and overridden virtual
> method, and changing it would not make the compiler notify about the
> porting need (Can't expect downstream to be using Q_DECL_OVERRIDE
> already).
Change the return value of the method that you don't want overridden to
something completely different.
You cannot override a method with a non-covariant return type, so that will
cause a compiler error and point to the change.
--
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/20120124/aac153e0/attachment.sig>
More information about the Development
mailing list