Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P3: Somewhat important
-
Resolution: Done
-
Affects Version/s: 5.11.2
-
Fix Version/s: 5.12.1, 5.13.0 Alpha 1
-
Component/s: Documentation
-
Labels:None
-
Platform/s:
-
Commits:b6a5aff9b7781fb98529e9a4beab0c2f43ac55fe (qt/qtdoc/5.12)
Description
I have taken another look at a source code example.
... try { app.exec(); } catch (const std::bad_alloc &) { ... return 0; // exit the application }
I find the shown program error code questionable here after insufficient memory was detected.
Can the value "ENOMEM" (or "EXIT_FAILURE") be more appropriate for this use case?