summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cpphoverhandler.cpp
diff options
context:
space:
mode:
authorcon <qtc-committer@nokia.com>2010-07-19 16:03:49 +0200
committercon <qtc-committer@nokia.com>2010-07-19 16:46:19 +0200
commit5b989680ffd8807b7b052f94027118b8c1db71b1 (patch)
tree2ea63b146b6b1882fb2b8aeef8a62165befa68b0 /src/plugins/cppeditor/cpphoverhandler.cpp
parentcaffe2c672c2e4ee6d896c35a39abf7453b63511 (diff)
downloadqt-creator-5b989680ffd8807b7b052f94027118b8c1db71b1.tar.gz
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
Diffstat (limited to 'src/plugins/cppeditor/cpphoverhandler.cpp')
-rw-r--r--src/plugins/cppeditor/cpphoverhandler.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/plugins/cppeditor/cpphoverhandler.cpp b/src/plugins/cppeditor/cpphoverhandler.cpp
index 5c84e86841..5e46c19c9e 100644
--- a/src/plugins/cppeditor/cpphoverhandler.cpp
+++ b/src/plugins/cppeditor/cpphoverhandler.cpp
@@ -289,14 +289,8 @@ void CppHoverHandler::handleLookupItemMatch(const LookupItem &lookupItem, const
if (matchingDeclaration->enclosingSymbol()->isClass() ||
matchingDeclaration->enclosingSymbol()->isNamespace() ||
matchingDeclaration->enclosingSymbol()->isEnum()) {
- const QList<const Name *> &names =
- LookupContext::fullyQualifiedName(matchingDeclaration);
- const int size = names.size();
- for (int i = 0; i < size; ++i) {
- qualifiedName.append(overview.prettyName(names.at(i)));
- if (i < size - 1)
- qualifiedName.append(QLatin1String("::"));
- }
+ qualifiedName.append(overview.prettyName(
+ LookupContext::fullyQualifiedName(matchingDeclaration)));
} else {
qualifiedName.append(overview.prettyName(matchingDeclaration->name()));
}