-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Qt: Add asynchronous dialog box helper functions and start switching to them #13601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
91832e0 to
56cc8a2
Compare
df60886 to
5cab996
Compare
5cab996 to
13b0f4a
Compare
|
I'm sure you did your homework before writing 500 lines, but looking through the code, I don't immediately see the benefit of rolling our own versions of these dialog boxes. The Qt documentation, when it warns about |
All the built-in Qt functions I'm replacing are helper functions that are hardcoded to use In the case of the QMessageBox ones the Qt documentation actually warns us about this. |
Yes, the diff of this PR serves as that example. These helpers functions let you replace the built-in Qt ones in a more or less one-to-one fashion. If you want to make a more complex custom message box you should still use |
Description of Changes
AsyncDialogsnamespace containing functions designed to replace the static helper functions from theQInputDialogandQMessageBoxclasses.Rationale behind Changes
This brings us one step closer to fixing #13450.
I was a bit reluctant to do this, since I know that asynchronous code is usually harder to read than synchronous code, but after some consideration I've come to the conclusion that this is the only sane way to fix these crashes.
In particular, in the case of the debugger it's not possible to safely block requests to delete the debugger window while a dialog box is open, because that would risk breaking hardcore mode compliance.
Tell me what you think about the API.
Suggested Testing Steps
Test all the dialog boxes in the debugger.
Fixes a crash on exit:
This also fixes a similar crash that happens when hardcore mode is enabled.
Did you use AI to help find, test, or implement this issue or feature?
No.