Skip to content

Conversation

@jchv
Copy link
Contributor

@jchv jchv commented Sep 1, 2025

Qt 6 no longer allows us to poll for the status of the event loop. However, Qt 6 does still have a processEvents function, and the overload with the timeout actually spins the event loop and returns as early as there are no more events in it. That's basically what we want to do. We could run this with a really huge timeout, but that would just make it more likely that hiro freezes up, so instead let's mirror hiro/gtk3 and use a 50ms timeout.

This also removes the public Application::pendingEvents API which does not seem like it was used by bsnes/higan/ares anyways.

jchv added 2 commits August 31, 2025 21:30
This does not seem to be used anywhere in bsnes, higan or ares. It's not
really possible to implement with Qt 6, which has stop exposing this
detail of the event loop. It turns out this is actually OK, since we
don't *really* need it anyway, and in the case of hiro/qt, the
replacement should be more robust anyways.
Qt 6 no longer allows us to poll for the status of the event loop.
However, Qt 6 does still have a processEvents function, and the version
with the timeout actually spins the event loop and returns as early as
there are no more events in it. That's basically what we want to do. We
could run this with a really huge timeout, but that would just make it
more likely that hiro freezes up, so instead let's mirror hiro/gtk3 and
use a 50ms timeout.
@jchv jchv mentioned this pull request Sep 1, 2025
@Alcaro
Copy link
Contributor

Alcaro commented Sep 1, 2025

  • Someone should inline pApplication::pendingEvents() in the other backends into their callers. (But not necessarily you, if you can't test them.)
  • Comparing the code's behavior to prior versions usually goes in commit message and/or PR description, not comments. (Not sure what the rules are in this specific project, though.)

@Screwtapello
Copy link
Contributor

I modified the comment to remove references to historical behaviour. I removed pendingEvents() from the GTK+ backend in b7678f5 and tested it, and filed #370 for removing it from the other backends (so we don't forget).

@jchv
Copy link
Contributor Author

jchv commented Sep 1, 2025

  • Comparing the code's behavior to prior versions usually goes in commit message and/or PR description, not comments. (Not sure what the rules are in this specific project, though.)

I suppose that's not an unreasonable point but if it's really that important I think it can be addressed by just dropping the last line of the comment some time.

edit: Ah yeah that's pretty much what you already did anyway. I'll pull that forward when I go to port this anywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants