aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-09-13 15:22:54 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 14:26:15 +0200
commit4a59984e0d024b88a1b556870b6c183816bb1d22 (patch)
tree1e06b670809247439ee386988bd2e8ce223069f0
parent7def3cfb31603b47a1b4e5690f8c650768f9b803 (diff)
[new compiler] Avoid type reference lookups with empty strings
For example when declaring signal mySignal(string blah) then we don't need to try to "resolve" the type "string". Change-Id: I80924ebf244c6b8e2827d19f9c78faf93031fe15 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-rw-r--r--src/qml/compiler/qqmlcodegenerator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/compiler/qqmlcodegenerator.cpp b/src/qml/compiler/qqmlcodegenerator.cpp
index 787b126b8a..fe57e246b0 100644
--- a/src/qml/compiler/qqmlcodegenerator.cpp
+++ b/src/qml/compiler/qqmlcodegenerator.cpp
@@ -839,7 +839,8 @@ void QQmlCodeGenerator::collectTypeReferences()
for (Signal *sig = obj->qmlSignals->first; sig; sig = sig->next)
for (SignalParameter *param = sig->parameters->first; param; param = param->next)
- _typeReferences.add(param->customTypeNameIndex, param->location);
+ if (!stringAt(param->customTypeNameIndex).isEmpty())
+ _typeReferences.add(param->customTypeNameIndex, param->location);
}
}