What's the alternative of api 'hasPendingEvents'?
-
wrote on 13 Mar 2025, 12:55 last edited by
What if i want to be sure that no more Events are beeing processed or queued before continuing e.g. cleanup etc..?!
Should i use processEvents(AllEvents) instead?! -
What if i want to be sure that no more Events are beeing processed or queued before continuing e.g. cleanup etc..?!
Should i use processEvents(AllEvents) instead?!@Zuuka As long as you're busy doing something the event queue is blocked and will not process any events.
-
wrote on 13 Mar 2025, 13:10 last edited by Zuuka
can i query if it is blocked?
In my case i just want to cleanup a Test class, and verify that all events have been processed before continuing with the cleanup. -
can i query if it is blocked?
In my case i just want to cleanup a Test class, and verify that all events have been processed before continuing with the cleanup.@Zuuka said in What's the alternative of api 'hasPendingEvents'?:
can i query if it is blocked?
Why? As I said: as long as your code is doing something (like a slot being executed) the event loop is blocked (means: it can't process events). There is no need to query anything.
-
Hi,
Out of curiosity, are you using QTest ?
-
wrote on 14 Mar 2025, 08:00 last edited by
Yes, i am using QTest :)
-
can i query if it is blocked?
In my case i just want to cleanup a Test class, and verify that all events have been processed before continuing with the cleanup.@Zuuka said in What's the alternative of api 'hasPendingEvents'?:
hat all events have been processed before continuing with the cleanup.
What exact events?
-
wrote on 17 Mar 2025, 13:50 last edited by
I think those are Custom Events.
-
Ok - why are they important? If they are that important then you also have to check for them in the first place. Use an event filter for example.
14/14