aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmlcodegenerator_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-12-06 11:29:43 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-06 21:51:04 +0100
commit32b7e01558e0d3c50dd10f846182fe5dc09686e9 (patch)
tree0d3cfeaca25f3e670edb6a848e94eca197477839 /src/qml/compiler/qqmlcodegenerator_p.h
parent24e2b39e7a06687322a18a158a083eb51a7c0dca (diff)
Clean up handling of illegal names and enable in new compiler
Access to the identifier hash may not be thread-safe from the loader thread, so use a QSet copy instead (which is cheap because we don't detach). This also enables the checking for illegal types again. Change-Id: I8c3ec1fd0fc01cce3269e206f479a90bdbbc89dd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qqmlcodegenerator_p.h')
-rw-r--r--src/qml/compiler/qqmlcodegenerator_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/compiler/qqmlcodegenerator_p.h b/src/qml/compiler/qqmlcodegenerator_p.h
index 0a0e4f2d5b..83ff716176 100644
--- a/src/qml/compiler/qqmlcodegenerator_p.h
+++ b/src/qml/compiler/qqmlcodegenerator_p.h
@@ -207,7 +207,7 @@ struct Q_QML_EXPORT QQmlCodeGenerator : public AST::Visitor
{
Q_DECLARE_TR_FUNCTIONS(QQmlCodeGenerator)
public:
- QQmlCodeGenerator();
+ QQmlCodeGenerator(const QSet<QString> &illegalNames);
bool generateFromQml(const QString &code, const QUrl &url, const QString &urlString, ParsedQML *output);
static bool isSignalPropertyName(const QString &name);
@@ -280,6 +280,8 @@ public:
QList<QQmlError> errors;
+ QSet<QString> illegalNames;
+
QList<QV4::CompiledData::Import*> _imports;
QList<Pragma*> _pragmas;
QList<QmlObject*> _objects;