[Qt-interest] Example of "moveToThread (this)" idiom -- legal?

BRM bm_witness at yahoo.com
Mon Jan 3 15:38:42 CET 2011


----- Original Message ----

> From: Thiago Macieira <thiago at kde.org>
> To: qt-interest at qt.nokia.com
> Sent: Sun, January 2, 2011 2:22:51 PM
> Subject: Re: [Qt-interest] Example of "moveToThread (this)" idiom -- legal?
> 
> On Sunday, 2 de January de 2011 10:18:01 K. Frank wrote:
> > Hi Mihail  -
> > 
> > On Sun, Jan 2, 2011 at 6:01 AM, Mihail Naydenov <mlists at ymail.com> wrote:
> > >  Without going through the example, I just wanted to remind you
> > > 
> > > Qt itself uses moveToThred(this)
> > > 
> > > (see  QFilesystemWatcher implementation)
> > 
> > Good point. It looks like it  uses the full "moveToThread (this)"
> > idiom:  It derives from  QThread, calls moveToThread (this),
> > and has signals ans slots.
> > 
> > > So, I am sure by definition moveToThred(this) is not  illegal.
> > 
> > Yes, QFileSystemWatcher looks like a strong vote  that
> > moveToThread (this) is technically legal.
> 
> Remember the one  big assumption here: that QFileSystemWatcher is properly 
> written.
> 
> It's not a given.
> 

Very true. Perhaps it needs a bug report filed on it?

Ben




More information about the Qt-interest-old mailing list