Merge remote-tracking branch 'origin/4.6'

Change-Id: I63f8aebb201936f671b1486ff9420f67e5e3fafc
This commit is contained in:
Eike Ziller
2018-03-01 15:46:37 +01:00
36 changed files with 298 additions and 73 deletions

View File

@@ -855,6 +855,10 @@ static bool checkTopLevelBindingForParentReference(ExpressionStatement *expStmt,
void Check::visitQmlObject(Node *ast, UiQualifiedId *typeId,
UiObjectInitializer *initializer)
{
// TODO: currently Qbs checks are not working properly
if (_doc->language() == Dialect::QmlQbs)
return;
// Don't do type checks if it's a grouped property binding.
// For instance: anchors { ... }
if (_doc->bind()->isGroupedPropertyBinding(ast)) {

View File

@@ -392,6 +392,15 @@ Import LinkPrivate::importNonFile(Document::Ptr doc, const ImportInfo &importInf
import.object->setPrototype(valueOwner->cppQmlTypes().objectByCppName(moduleApi.cppName));
}
// TODO: at the moment there is not any types information on Qbs imports.
// Just check that tha the import is listed in the Qbs bundle.
if (doc->language() == Dialect::QmlQbs) {
QmlBundle qbs = ModelManagerInterface::instance()
->activeBundles().bundleForLanguage(Dialect::QmlQbs);
if (qbs.supportedImports().contains(importInfo.name()))
importFound = true;
}
if (!importFound && importInfo.ast()) {
import.valid = false;
error(doc, locationFromRange(importInfo.ast()->firstSourceLocation(),