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>
commit83a9f71a0ecbbd842aab50fde8b7dc154ebd9c7b
parente3548c16e184cbc961496448450d8dc855b436ec
authorFabian Kosmale <fabian.kosmale@qt.io>
committerUlf Hermann <ulf.hermann@qt.io>
commit timeTue, 20 Oct 2026 17:56:10 +0000