QCalendar: move memory allocation out of critical section

By Amdahl's Law, provides for more scalability.

This is just for backporting. The registry should really be able to
perform lookups without allocating memory...

Pick-to: 6.3 6.2
Change-Id: Ifbb832a06991b9ee9a1fd6a43db567bb572fca4f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Marc Mutz 2022-01-26 08:31:34 +01:00
parent 4ecbebebf7
commit 97b465455b
1 changed files with 2 additions and 1 deletions

View File

@ -379,8 +379,9 @@ const QCalendarBackend *QCalendarRegistry::fromName(QAnyStringView name)
{
ensurePopulated();
const QString nameU16 = name.toString();
QReadLocker locker(&lock);
return byName.value(name.toString(), nullptr);
return byName.value(nameU16, nullptr);
}
/*