diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-08-01 09:05:19 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-08-01 20:51:05 +0000 |
commit | 145ff3118cf27455180bbcff2d37b24cf32276f7 (patch) | |
tree | 0264e5c203bcc150805476e8759237e17a68f7f8 /src/qml/compiler/qqmlirbuilder.cpp | |
parent | 5f9c61ca9ff8921fe8a00e4cbf30ec8a4d5c6770 (diff) |
Simplify parsing of pragma directives
We only support 'pragma Singleton' currently, so there is no need
to parse the right hand side of pragma as a member expression.
Change-Id: Ic0dcbedb52cb58db2fd1cc099f14fd399b7162e3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qqmlirbuilder.cpp')
-rw-r--r-- | src/qml/compiler/qqmlirbuilder.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index e9685597f6..ed3b55c2c6 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -691,9 +691,9 @@ bool IRBuilder::visit(QQmlJS::AST::UiPragma *node) Pragma *pragma = New<Pragma>(); // For now the only valid pragma is Singleton, so lets validate the input - if (!node->pragmaType->name.isNull()) + if (!node->name.isNull()) { - if (QLatin1String("Singleton") == node->pragmaType->name) + if (QLatin1String("Singleton") == node->name) { pragma->type = Pragma::PragmaSingleton; } else { |