QmlCompiler: align import behavior with interpreter


We were preferring QML files over C++-defined types of the same name.
That's wrong. Change the behavior to prefer C++-defined types. qmllint
reported false positive warnings about these, and qmlcachegen rejected
them as ambiguous. They are in fact not ambiguous and we can compile
them.

Pick-to: 6.12
Task-number: QTBUG-150967
Change-Id: I7ae7265b96bb4c04d87143126db8fd98429f193c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
commit2f8bba69dd6513f4fe3d861cadae36e578a4b096
parent2f77e1033471a28b93b89d7e21cd236876bfba70
authorUlf Hermann <ulf.hermann@qt.io>
committerUlf Hermann <ulf.hermann@qt.io>
commit timeMon, 12 Oct 2026 12:28:17 +0000