diff options
author | Topi Reinio <topi.reinio@theqtcompany.com> | 2016-06-21 11:59:13 +0200 |
---|---|---|
committer | Topi Reiniƶ <topi.reinio@theqtcompany.com> | 2016-08-16 11:27:18 +0000 |
commit | 3c5fa29f78816d8cc7fd9fa6e9462e2a9f283f64 (patch) | |
tree | 67dc25d7396fbdb45dd0e8983f0ea3cc5e3749a9 /src/qdoc/cppcodeparser.cpp | |
parent | 72901b9295394034ac52cd6174e6b50fa19a317d (diff) | |
download | qttools-3c5fa29f78816d8cc7fd9fa6e9462e2a9f283f64.tar.gz |
qdoc: Improve resolution of QML type inheritance
QDoc maintains a global map of base types for all QML types. This
caused issues whenever QML modules have conflicting type names;
for example, types from Qt Quick Controls (v1) were incorrectly
marked as deriving from QQC v2 'Control' type.
To improve the situation, make following changes:
- Manage 'inherited by' map in a single location. Types are
added to this map in a pre-generate step
(QDocDatabase::resolveQmlInheritance()) after parsing all
sources. This allows better control of searching - if the
QML type node has an import list, the search is now
always based on it.
- Add a safeguard against using a base type from a module
with major version different to the import statement.
- Use node pointers as keys in 'Inherited by' map,
instead of type-name strings.
Task-number: QTBUG-53529
Change-Id: I6665a520c9197fa90e84d67b12e3405b5b3f0901
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Diffstat (limited to 'src/qdoc/cppcodeparser.cpp')
-rw-r--r-- | src/qdoc/cppcodeparser.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp index 5b7792d32..57cd1e917 100644 --- a/src/qdoc/cppcodeparser.cpp +++ b/src/qdoc/cppcodeparser.cpp @@ -970,7 +970,6 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc, else if (node->isQmlType() || node->isJsType()) { QmlTypeNode* qmlType = static_cast<QmlTypeNode*>(node); qmlType->setQmlBaseName(arg); - QmlTypeNode::addInheritedBy(arg,node); } } else if (command == COMMAND_QMLINSTANTIATES) { |