[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>
This commit is contained in:
Simon Hausmann 2013-09-13 15:22:54 +02:00 committed by The Qt Project
parent 7def3cfb31
commit 4a59984e0d
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}
}