Or old and new load hints in mergeLoadHints() instead of just storing new ones. Andjust QLibraryPrivate::setLoadHints() to handle objects with no file name differently and just set load hints directly.
Mention that load hints are merged once the file name is set in the documentation for QLibrary::setLoadHints().
Add a regression test into tst_qfactoryloader.
Update and extend tst_QPluginLoader::loadHints() to take into account load hints merging.