gcc -Woverloaded-virtual
Aurélien Gâteau
aurelien.gateau at free.fr
Tue Nov 27 15:07:28 GMT 2007
David Faure wrote:
> On Tuesday 27 November 2007, Aurélien Gâteau wrote:
>> David Faure wrote:
>>
>> >> Adding a new virtual method to a class is not binary compatible, but
>> >> reimplementing an existing virtual method is binary compatible, or am
>> >> I wrong? In this case we don't need to keep the method.
>> >
>> > It's BC but old programs that haven't been recompiled will not call the
>> > reimplementation if we re-add it later.
>> > So I would rather leave it, for symmetry with addSubjob being
>> > reimplemented.
>>
>> This is true if the program instantiates the class itself, but in the
>> case of jobs, they are instantiated by the kio libraries, so I guess the
>> job instances would always have up-to-date virtual tables.
>
> Well, I was thinking about jobs implemented out of kdelibs, e.g. KMail has
> imap-related jobs that derive from KIO::Job, KIO::SpecialJob, etc. and it
> does call addSubjob/removeSubjob.
Oh I see.
>> On the other hand I see your point about keeping the symetry. And you
>> know this code much better than me, so it's your decision.
>>
>> I can commit the second version of my patch if you want, but I don't feel
>> like doing the other changes we discussed myself, because I don't have a
>> complete KDE checkout.
>
> I'll do it then, no problem.
> Thanks for the fruitful discussion, was more effort than the actual code
> changes :-)
Was fruitful for me too, as I learnt a few things :-)
Aurélien
More information about the kde-core-devel
mailing list