Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
The documentation for QDialog::exec says:
Note: Avoid using this function; instead, use open(). Unlike exec(), open() is asynchronous, and does not spin an additional event loop. This prevents a series of dangerous bugs from happening (e.g. deleting the dialog's parent while the dialog is open via exec()).
See also https://blog.qt.io/blog/2010/02/23/unpredictable-exec/ .
However, the main QDialog documentation just says:
The most common way to display a modal dialog is to call its exec() function.
…which might lead new users to think QDialog::exec() is just fine, if they don't happen to see the method-specific documentation.
Would it be appropriate to mark QDialog::exec() deprecated (and remove the mention in the main QDialog documentation), since it's problematic and an alternative API is available?