Trolltech Home | Qt4-preview-feedback Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt4-preview-feedback Archive, May 2007
QEventLoop::ProcessEventsFlags


Message 1 in thread

Hello,

The description of these event loop process
flags doesn't jibe with what I'm seeing with
the 20070510 snapshot.

Specifically, QEventLoop::AllEvents does not
seem to process deferred deletion events.
There is a DeferredDeletion flag, but its
description is pretty vague:

"Allow objects to be queued for deletion at a later time."

If that flag is required to get deferred
deletion events to be processed, then this
should be reworded.

Joe Newman
Synopsys. Inc.


To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx


Message 2 in thread

On Wednesday 23 May 2007, Joe Newman wrote:
> 
> Hello,
> 
> The description of these event loop process
> flags doesn't jibe with what I'm seeing with
> the 20070510 snapshot.
> 
> Specifically, QEventLoop::AllEvents does not
> seem to process deferred deletion events.

From other threads, or is this about a single-threaded app?

-- 
 [ signature omitted ] 

Message 3 in thread

>> The description of these event loop process
>> flags doesn't jibe with what I'm seeing with
>> the 20070510 snapshot.
>> 
>> Specifically, QEventLoop::AllEvents does not
>> seem to process deferred deletion events.
>
>From other threads, or is this about a single-threaded app?

Single-threaded in this case.  If that's
relevant, then that would be one more
thing that should be spelled out in the
description of these flags.

And if there isn't a way to get deferred
deletions to happen at least by the next
time a user event occurs, in either the
single or multi threaded case, I would
consider that a problem.

Thanks,

Joe


To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx


Message 4 in thread

Yes, indeed, if you want to replace app.exec() - you'll need to specify
QEventLoop::DeferredDeletion. The troll i was talking to 2 weeks ago
told me that he would "ask the doc team to update the documentation
regarding this flag so its clearer".

Cheers,
Peter

P.S. Make sure though that when you call processEvents with this flag
that you don't have a caller stack that still needs objects that would
be deleted by this flag. (i.e. only use it for "your version of the
event loop" not inside some slot that can be called with an arbitrary
stack)


> -----Original Message-----
> From: Joe Newman [mailto:Joe.Newman@xxxxxxxxxxxx]
> Sent: Wednesday, May 23, 2007 11:27 PM
> To: qt4-preview-feedback@xxxxxxxxxxxxx
> Subject: QEventLoop::ProcessEventsFlags
> 
> 
> Hello,
> 
> The description of these event loop process
> flags doesn't jibe with what I'm seeing with
> the 20070510 snapshot.
> 
> Specifically, QEventLoop::AllEvents does not
> seem to process deferred deletion events.
> There is a DeferredDeletion flag, but its
> description is pretty vague:
> 
> "Allow objects to be queued for deletion at a later time."
> 
> If that flag is required to get deferred
> deletion events to be processed, then this
> should be reworded.
> 
> Joe Newman
> Synopsys. Inc.
> 
> 
> To unsubscribe - send "unsubscribe" in the subject to qt4-preview-
> feedback-request@xxxxxxxxxxxxx

To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx


Message 5 in thread

On Thursday 24 May 2007 10:21:44 Peter Prade wrote:
> Yes, indeed, if you want to replace app.exec() - you'll need to specify
> QEventLoop::DeferredDeletion. The troll i was talking to 2 weeks ago
> told me that he would "ask the doc team to update the documentation
> regarding this flag so its clearer".
>
> Cheers,
> Peter
>
> P.S. Make sure though that when you call processEvents with this flag
> that you don't have a caller stack that still needs objects that would
> be deleted by this flag. (i.e. only use it for "your version of the
> event loop" not inside some slot that can be called with an arbitrary
> stack)

FYI, We are currently trying to make the DeferredDeletion flag unnecessary. 
The fact that the flag exists is an ugly wart, showing a shortcoming in how 
Qt deals with DeferredDelete events.

:)

-- 
 [ signature omitted ] 

Message 6 in thread

Is the plan to eliminate this flag in the 4.3
release?  For what it's worth, we're using it
in our single-threaded app's event loop, and
there are still QMdiSubWindows with deferred
deletion that do not get deleted, even with
the flag set.  I've had to introduce a nasty
hack to keep up with them myself and free them
the next time through the loop.

-Joe



-----Original Message-----
From: Bradley T Hughes [mailto:bhughes@xxxxxxxxxxxxx] 
Sent: Thursday, May 24, 2007 1:29 AM
To: qt4-preview-feedback@xxxxxxxxxxxxx
Cc: Peter Prade
Subject: Re: QEventLoop::ProcessEventsFlags

On Thursday 24 May 2007 10:21:44 Peter Prade wrote:
> Yes, indeed, if you want to replace app.exec() - you'll need to
specify
> QEventLoop::DeferredDeletion. The troll i was talking to 2 weeks ago
> told me that he would "ask the doc team to update the documentation
> regarding this flag so its clearer".
>
> Cheers,
> Peter
>
> P.S. Make sure though that when you call processEvents with this flag
> that you don't have a caller stack that still needs objects that would
> be deleted by this flag. (i.e. only use it for "your version of the
> event loop" not inside some slot that can be called with an arbitrary
> stack)

FYI, We are currently trying to make the DeferredDeletion flag
unnecessary. 
The fact that the flag exists is an ugly wart, showing a shortcoming in
how 
Qt deals with DeferredDelete events.

:)

-- 
 [ signature omitted ] 

Message 7 in thread

Joe Newman wrote:
> Is the plan to eliminate this flag in the 4.3
> release?  For what it's worth, we're using it
> in our single-threaded app's event loop, and
> there are still QMdiSubWindows with deferred
> deletion that do not get deleted, even with
> the flag set.  I've had to introduce a nasty
> hack to keep up with them myself and free them
> the next time through the loop.

Unfortunately not, this will most likely happen for 4.4, since 4.3 is right 
around the corner and changing how DeferredDelete events are handled this late 
is too risky.

> -Joe
> 
> 
> 
> -----Original Message-----
> From: Bradley T Hughes [mailto:bhughes@xxxxxxxxxxxxx] 
> Sent: Thursday, May 24, 2007 1:29 AM
> To: qt4-preview-feedback@xxxxxxxxxxxxx
> Cc: Peter Prade
> Subject: Re: QEventLoop::ProcessEventsFlags
> 
> FYI, We are currently trying to make the DeferredDeletion flag
> unnecessary. 
> The fact that the flag exists is an ugly wart, showing a shortcoming in
> how 
> Qt deals with DeferredDelete events.
> 
> :)
> 


-- 
 [ signature omitted ]