On Sun, Jan 15, 2012 at 7:25 PM, Peter Kuemmel <syntheti...@gmx.net> wrote:
>
> Off topic:
>
>>
>> There would still be silent errors for people who have reimplemented
>> the createRequest method (it's virtual).
>>
>
> Technically interesting here is the question how such a
> situation cloud be managed? Using C++11 'final' would
> prevent the reimplementation. But using pre C++11, the only
> idea I have is to define a dummy function with a different
> return value, only this why the compiler would complain.

One way would be to deliberately have a non-virtual method with the
old name, then if you have the appropriate warnings turned on you'd
get one for shadowing the existing method. I guess you might also be
able to do something compiler specific to generate warnings in this
situation (similar to the way deprecation attributes work).

Cheers

Rich.
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to