qdoc: Don't confuse QML and C++ type names when resolving attributes
A QML type "Foo" can be backed by a C++ type "Bar" while an unrelated
C++ type "Foo" still exists. Omit guessing the native type if the
\nativetype (or the deprecated \instantiates) command is used in a
\qmltype topic.
Pick-to: 6.12 6.11
Fixes: QTBUG-149298
Change-Id: I3a467fff0ed830c258457208e421d4f0be6eb616
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
| commit | 86182345c8aab88b1cbf7e0e016b5da206986003 |
| parent | 8bf3341912ee4cdcc70504630ba0fec0f2bc68c1 |
| author | Ulf Hermann <ulf.hermann@qt.io> |
| committer | Ulf Hermann <ulf.hermann@qt.io> |
| commit time | Mon, 31 Aug 2026 13:13:12 +0000 |
- M src/qdoc/qdoc/src/qdoc/cppcodeparser.cpp
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qmlsingleton/expected/namesakeobject.html
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qmlsingleton/expected/plainobject.html
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qmlsingleton/expected/qml-test-namesake-members.html
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qmlsingleton/expected/qml-test-namesake.html
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qmlsingleton/expected/qml-test-namesakeobject-members.html
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qmlsingleton/expected/qml-test-namesakeobject.html
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qmlsingleton/expected/qmlsingletontest.index
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qmlsingleton/expected/test-qmlmodule.html
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qmlsingleton/expected/testmodule-module.html
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qmlsingleton/src/namesakesingleton.cpp
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qmlsingleton/src/namesakesingleton.h
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qmlsingleton/src/namesaketest.qdoc