summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-12-22 09:41:10 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2019-03-15 13:04:46 +0000
commit24ec7b6c8352600230c40b61be4bfce07076c9a5 (patch)
tree5cadb53cf3d8ba93105a34ef1ee497e8bd18cb64 /tools
parent8a69735c4914d02be9448b6ae98e4c550e1f187a (diff)
Fix up global name determination when compiling ahead of time
The list of names is still suboptimal, but at least it's shared now. Task-number: QTBUG-69898 Change-Id: I16c9839c4a1f097053b28caea894b67757972826 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlcachegen/qmlcachegen.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/tools/qmlcachegen/qmlcachegen.cpp b/tools/qmlcachegen/qmlcachegen.cpp
index 1805dde5d2..1bfc831dac 100644
--- a/tools/qmlcachegen/qmlcachegen.cpp
+++ b/tools/qmlcachegen/qmlcachegen.cpp
@@ -51,17 +51,8 @@ QSet<QString> illegalNames;
void setupIllegalNames()
{
- // #### this in incomplete
- illegalNames.insert(QStringLiteral("Math"));
- illegalNames.insert(QStringLiteral("Array"));
- illegalNames.insert(QStringLiteral("String"));
- illegalNames.insert(QStringLiteral("Function"));
- illegalNames.insert(QStringLiteral("Boolean"));
- illegalNames.insert(QStringLiteral("Number"));
- illegalNames.insert(QStringLiteral("Date"));
- illegalNames.insert(QStringLiteral("RegExp"));
- illegalNames.insert(QStringLiteral("Error"));
- illegalNames.insert(QStringLiteral("Object"));
+ for (const char **g = QV4::Compiler::Codegen::s_globalNames; *g != nullptr; ++g)
+ illegalNames.insert(QString::fromLatin1(*g));
}
struct Error