summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/winrt/qwinrtplatformtheme.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-08-03 21:34:35 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2021-01-25 18:04:36 +0100
commit0180a1ab8229c6a15d19317bf7680663ac402910 (patch)
tree7727c118cba3c289e2be43d70f716ca7864a05c6 /src/plugins/platforms/winrt/qwinrtplatformtheme.cpp
parent56f12656f59910d6a762725818a1f255e2df086d (diff)
Make QCalendar's backend registration reentrant-safeHEADdev
Previously, different threads instantiating the same back-end could collide in the register, with various unwelcome results. Give Registry an atomic status flag to track whether it has been populated or is being destroyed; and protect it with a mutex to ensure distinct threads do not collide during registration or attempt to register while the registry is being destroyed. Document the correct way to instantiate custom backends, and that no code other than the QCalendar implementation should instantiate the built-in ones. Instantiators that follow these rules should be safe from failed registrations, provided they don't pick a name that conflicts with some other backend. They can also use the recent change to semantics of registerAlias() to verify that registration *has* succeeded. Done-with: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Pick-to: 6.0 5.15 Task-number: QTBUG-88815 Task-number: QTBUG-85692 Fixes: QTBUG-84575 Change-Id: Ie78e700e71d610454152c05cafb38f6f713649ad Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtplatformtheme.cpp')
0 files changed, 0 insertions, 0 deletions