* plugins.qmltypes files */
| 685 | * plugins.qmltypes files |
| 686 | */ |
| 687 | void DeclarationBuilder::declareComponent(QmlJS::AST::UiObjectInitializer* node, |
| 688 | const RangeInRevision &range, |
| 689 | const Identifier &name) |
| 690 | { |
| 691 | QString baseClass = QmlJS::getQMLAttributeValue(node->members, QStringLiteral("prototype")).value.section(QLatin1Char('/'), -1, -1); |
| 692 | |
| 693 | // Declare the component itself |
| 694 | StructureType::Ptr type(new StructureType); |
| 695 | |
| 696 | ClassDeclaration* decl; |
| 697 | { |
| 698 | DUChainWriteLocker lock; |
| 699 | decl = openDeclaration<ClassDeclaration>(name, range); |
| 700 | |
| 701 | decl->setKind(Declaration::Type); |
| 702 | decl->setClassType(ClassDeclarationData::Interface); |
| 703 | decl->clearBaseClasses(); |
| 704 | |
| 705 | if (!baseClass.isEmpty()) { |
| 706 | addBaseClass(decl, baseClass); |
| 707 | } |
| 708 | |
| 709 | type->setDeclaration(decl); |
| 710 | decl->setType(type); // declareExports needs to know the type of decl |
| 711 | } |
| 712 | openType(type); |
| 713 | } |
| 714 | |
| 715 | void DeclarationBuilder::declareMethod(QmlJS::AST::UiObjectInitializer* node, |
| 716 | const RangeInRevision &range, |
nothing calls this directly
no test coverage detected