Re: [Development] override keyword on destructors

2018-08-23 Thread Matthew Woehlke
On 2018-08-20 09:58, Kevin Funk wrote: > IMO, it would also be nice to get a compiler warning/error if a > base class' destructor is changed from virtual to non-virtual which may cause > subtle behavioral changes such as memory leaks. You mean something like -Wnon-virtual-dtor? Granted, it's no

Re: [Development] override keyword on destructors

2018-08-21 Thread Lars Knoll
I’d agree with most comments. I find the override keyword on destructors useful, and would like to keep it/encourage having it. Cheers, Lars > On 20 Aug 2018, at 08:47, André Pönitz wrote: > > On Mon, Aug 20, 2018 at 01:08:36PM +0100, Sérgio Martins via Development > wrote: >> Hi, >> >> Look

Re: [Development] override keyword on destructors

2018-08-20 Thread André Pönitz
On Mon, Aug 20, 2018 at 01:08:36PM +0100, Sérgio Martins via Development wrote: > Hi, > > Looks like some 'override' keywords crept into a few destructors. This is > probably because clang-tidy warns about it (and now QtCreator). > > IMO we should avoid it, as it's misleading. Dtors are a special

Re: [Development] override keyword on destructors

2018-08-20 Thread Philippe
I have recently used Resharper C++ to automatically add override to destructor declarations, on a very large application. Conclusion: very instructive with reflexions such as: "ha ha! this base class is virtual!" IOW, override on dtor reveals information which can be useful to understand code.

Re: [Development] override keyword on destructors

2018-08-20 Thread Giuseppe D'Angelo via Development
On 20/08/18 16:40, Eike Ziller wrote: For example when removing QObject as a base class in a class hierarchy. We regularly do these kind of changes in Qt Creator, when we find out that we don’t need the baggage of QObject after all for something. Do you have an example of such a change, that w

Re: [Development] override keyword on destructors

2018-08-20 Thread Eike Ziller
> On 20. Aug 2018, at 16:12, Ville Voutilainen > wrote: > > On 20 August 2018 at 16:58, Kevin Funk via Development > wrote: >> On Monday, 20 August 2018 14:08:36 CEST Sérgio Martins via Development wrote: >>> Hi, >>> >>> >>> Looks like some 'override' keywords crept into a few destructors.

Re: [Development] override keyword on destructors

2018-08-20 Thread Ville Voutilainen
On 20 August 2018 at 16:58, Kevin Funk via Development wrote: > On Monday, 20 August 2018 14:08:36 CEST Sérgio Martins via Development wrote: >> Hi, >> >> >> Looks like some 'override' keywords crept into a few destructors. This >> is probably because clang-tidy warns about it (and now QtCreator).

Re: [Development] override keyword on destructors

2018-08-20 Thread Kevin Funk via Development
On Monday, 20 August 2018 14:08:36 CEST Sérgio Martins via Development wrote: > Hi, > > > Looks like some 'override' keywords crept into a few destructors. This > is probably because clang-tidy warns about it (and now QtCreator). > > IMO we should avoid it, as it's misleading. Dtors are a specia

[Development] override keyword on destructors

2018-08-20 Thread Sérgio Martins via Development
Hi, Looks like some 'override' keywords crept into a few destructors. This is probably because clang-tidy warns about it (and now QtCreator). IMO we should avoid it, as it's misleading. Dtors are a special case and have completely different semantics. They don't replace their base class dto