[Interest] Destructor of QThread is not virtual in 4.7.1

Thiago Macieira thiago.macieira at intel.com
Thu Aug 1 23:20:49 CEST 2013


On quinta-feira, 1 de agosto de 2013 16:52:34, william.crocker at analog.com 
wrote:
> On 08/01/2013 01:54 PM, Giuseppe D'Angelo wrote:
> > On 1 August 2013 19:50, Bill Crocker<william.crocker at analog.com>  wrote:
> >> Note that QThread already has a virtual member function, run(),
> >> so this would not be it's first.
> >> 
> >> Is true?
> > 
> > No. QThread inherits from QObject, which has a virtual dtor. That's
> > enough for making any subclasses' dtor virtual.
> 
> Grrr. Yes, of course. Embarrassing. I should have known that.
> 
> I guess I was so excited to have found *something*
> that would bring my latest quest to an end that
> I just stopped thinking. Back to the drawing board.

It's not that difficult to find something wrong in Qt. But you shouldn't try to 
find it in some place that's been used by everyone and their mothers for 10 
years -- the chance that there's something wrong there is fairly small :-)

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130801/115676a1/attachment.sig>


More information about the Interest mailing list