Commit 64b6788b authored by Denis Steckelmacher's avatar Denis Steckelmacher

Signal declarations in plugin.qmltypes files must have an internal function...

Signal declarations in plugin.qmltypes files must have an internal function context for their parameters to be visible in their slots.
parent fae3fb8a
......@@ -641,12 +641,18 @@ void DeclarationBuilder::declareComponentSubclass(QmlJS::AST::UiObjectInitialize
DUContext* ctx = currentContext();
Declaration* decl = currentDeclaration();
ClassFunctionDeclaration* classDecl = dynamic_cast<ClassFunctionDeclaration*>(decl);
{
// Set the inner context of the current declaration, because nested classes
// need to know the inner context of their parents
DUChainWriteLocker lock;
decl->setInternalContext(ctx);
if (classDecl) {
classDecl->setInternalFunctionContext(ctx);
} else {
decl->setInternalContext(ctx);
}
if (contextType == DUContext::Namespace) {
// If we opened a namespace, ensure that its internal context is of namespace type
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment