QQmlTypeData: Ignore stale errors from loadDependentImports
When we call loadDependentImports from loadImplicitImport, it might put
errors into the error list, even though importing doesn't fail (e.g.
from failing to load a plugin from a module in qrc, but later picking
the plugin up from the actual file system).
This happens because QQmlTypeLoader::locateLocalQmldir might populate
errors, but might still succeed later.
So don't rely on the error list being empty as the indicator of whether
there was an issue, but instead explicitly track it.
In a future commit, we might want to ensure that locateLocalQmldir
doesn't actually stores irrelevant errors, but this more minimal fix is
more suitable for older branches.
Fixes: QTBUG-151403
Pick-to: 6.12 6.8
Change-Id: I8fea49a42fbdd5f820b4413801727425530205ee
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>