On Tuesday, January 24, 2012 20:36:53 Thiago Macieira wrote: > 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.
Yes, that's one of the things I tried: On Tuesday, January 24, 2012 22:45:54 Stephen Kelly wrote: > , and changing the return type > (success - clang gives an error for the derivation before porting). > > In the cases where an error is given for the deriving code (before > porting), calling code still can't compile because the call is ambiguous > anyway. I would have to actually add new virtual methods with a new name instead of changing the parameters (and then call the old implementation from the old one - which would mean not deprecating the old one). I'm not sure that's worth it. I also can't think of a more elegant solution, so I may just have to give up on it. Thanks, -- Stephen Kelly <stephen.ke...@kdab.com> | Software Engineer KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090 KDAB - Qt Experts - Platform-Independent Software Solutions
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development