Enable exceptions in Qt5CoreCompat
This code used to be part of QtCore, which has exceptions
enabled. When it was moved out to its own module, exceptions were
forgotten.
According to Thiago, disabled exceptions doesn't mean that exceptions
can't travel though, only that this module's stack won't be unwound in
the sense that destructors are called. So this is not BiC. It only
enables proper cleanup in our own code.
As a static assertion that exceptions are enabled, replace
QT_TRY/QT_CATCH with try/catch in qxml.cpp. The ones in qlinkedlist.h
have to stay, since they are compiled by the user, and depend on the
user's exception settings.
Amends d804721490e42fdef4aa185a2a9efb316e5b50fd (6.0), which created
the Core5Compat module with exceptions disabled.
[ChangeLog][QtCore5Compat] Is now built with exceptions enabled.
Before, exceptions (e.g. thrown from QtCore) could still travel
through the module's code, but would not run the module's cleanup,
leaking resources such as memory and mutex locks.
Pick-to: 6.12 6.12.0 6.11 6.11.3 6.8 6.5
Fixes: QTBUG-150303
Change-Id: I2e876160d9ed6bde2ec93458ea42790ba9c8b3df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>