summaryrefslogtreecommitdiff
path: root/src/plugins/qmljseditor/qmljseditordocument.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmljseditor/qmljseditordocument.cpp')
-rw-r--r--src/plugins/qmljseditor/qmljseditordocument.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/qmljseditor/qmljseditordocument.cpp b/src/plugins/qmljseditor/qmljseditordocument.cpp
index ccae08f6dd..bbd53bcf41 100644
--- a/src/plugins/qmljseditor/qmljseditordocument.cpp
+++ b/src/plugins/qmljseditor/qmljseditordocument.cpp
@@ -295,8 +295,8 @@ protected:
decl.text += QLatin1Char('(');
for (FormalParameterList *it = ast->formals; it; it = it->next) {
- if (!it->name.isEmpty())
- decl.text += it->name;
+ if (!it->element->bindingIdentifier.isEmpty())
+ decl.text += it->element->bindingIdentifier;
if (it->next)
decl.text += QLatin1String(", ");
@@ -309,14 +309,14 @@ protected:
return false;
}
- bool visit(AST::VariableDeclaration *ast) override
+ bool visit(AST::PatternElement *ast) override
{
- if (ast->name.isEmpty())
+ if (!ast->isVariableDeclaration() || ast->bindingIdentifier.isEmpty())
return false;
Declaration decl;
decl.text.fill(QLatin1Char(' '), _depth);
- decl.text += ast->name;
+ decl.text += ast->bindingIdentifier;
const SourceLocation first = ast->identifierToken;
decl.startLine = first.startLine;
@@ -343,8 +343,8 @@ protected:
decl.text += QLatin1Char('(');
for (FormalParameterList *it = funcExpr->formals; it; it = it->next) {
- if (!it->name.isEmpty())
- decl.text += it->name;
+ if (!it->element->bindingIdentifier.isEmpty())
+ decl.text += it->element->bindingIdentifier;
if (it->next)
decl.text += QLatin1String(", ");