D17563: Don't crash with Qt 5.11+

Kevin Funk noreply at phabricator.kde.org
Fri Dec 14 08:26:50 GMT 2018


kfunk added inline comments.

INLINE COMMENTS

> marten wrote in articleviewerwebengine.cpp:68
> Is there any point in using 'override' on destructors?  There is no function signature to trigger the usual warning case (derived class defines a function with a different signature, so not really replacing the base class virtual), so there is no way a destructor can be written to not override.  The compiler doesn't consider destructors in its override warning.
> 
> The only way in which 'override' would be useful on a destructor would be to give an error if the base class destructor was not declared virtual, but with a correctly written base class this should not arise.

Sorry for getting more off-topic, but /me wants to clarify this:

> The only way in which 'override' would be useful on a destructor would be to give an error if the base class destructor was not declared virtual, (...)

Right, and why not protect against this? I think adding an `override` to dtors makes a lot of sense. Especially if you think of `override` as of: "I expect there to exist a base class version of this function which is declared virtual".

Also see discussion on qt-development: https://lists.qt-project.org/pipermail/development/2018-August/033437.html

REPOSITORY
  R201 Akregator

REVISION DETAIL
  https://phabricator.kde.org/D17563

To: amantia, PHID-PROJ-odxxyyfgujhgbu6ergrt, mlaurent
Cc: marten, asturmlechner, kfunk, kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20181214/615eb857/attachment.html>


More information about the kde-pim mailing list