Fixes: Completing switch statements with enums in namespaces or classes.

We need to add the fully qualified name to the case statements.

Reviewed-by: Roberto Raggi
This commit is contained in:
con
2010-07-19 16:03:49 +02:00
parent caffe2c672
commit 5b989680ff
5 changed files with 73 additions and 14 deletions

View File

@@ -137,6 +137,18 @@ QString Overview::prettyName(const Name *name) const
return pp(name);
}
QString Overview::prettyName(const QList<const Name *> &fullyQualifiedName) const
{
QString result;
const int size = fullyQualifiedName.size();
for (int i = 0; i < size; ++i) {
result.append(prettyName(fullyQualifiedName.at(i)));
if (i < size - 1)
result.append(QLatin1String("::"));
}
return result;
}
QString Overview::prettyType(const FullySpecifiedType &ty, const Name *name) const
{
return prettyType(ty, prettyName(name));