In Qt 6, QMap is just a shared pointer to a std::map.
QLibraryStore::libraryMap is never copied, though, so the implicit
sharing that QMap adds on top of std::map is useless.
Use the underlying std::map directly.
Yes, the std::map API is a bit raw around the edges (std::pair
value_type), but we're professionals here.
This one saves more than 3.7KiB in TEXT size on optimized AMD64 GCC 11
C++20 Linux builds.
As a drive-by, port iterator- to range-based loops, and take advantage
of loop variables being real references now.
Change-Id: I1a8970b21e34a69d88a122f31699a51fd982feb9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>