| 1397 | } |
| 1398 | |
| 1399 | AbstractType::Ptr DeclarationBuilder::typeFromClassName(const QString& name) |
| 1400 | { |
| 1401 | DeclarationPointer decl = QmlJS::getDeclaration(QualifiedIdentifier(name), currentContext()); |
| 1402 | |
| 1403 | if (!decl) { |
| 1404 | if (name == QLatin1String("QRegExp")) { |
| 1405 | decl = QmlJS::NodeJS::instance().moduleMember(QStringLiteral("__builtin_ecmascript"), QStringLiteral("RegExp"), currentContext()->url()); |
| 1406 | } |
| 1407 | } |
| 1408 | |
| 1409 | if (decl) { |
| 1410 | return decl->abstractType(); |
| 1411 | } else { |
| 1412 | DelayedType::Ptr type(new DelayedType); |
| 1413 | type->setKind(DelayedType::Unresolved); |
| 1414 | type->setIdentifier(IndexedTypeIdentifier(name)); |
| 1415 | return type; |
| 1416 | } |
| 1417 | } |
| 1418 | |
| 1419 | void DeclarationBuilder::addBaseClass(ClassDeclaration* classDecl, const QString& name) |
| 1420 | { |
nothing calls this directly
no test coverage detected