From 59624d91a1efd9b5d1725fafaa9f180baf866ef6 Mon Sep 17 00:00:00 2001
From: Roberto Raggi <roberto.raggi@nokia.com>
Date: Mon, 16 Feb 2009 19:07:22 +0100
Subject: [PATCH] Set the resolved symbol (it needs some cleanup).

---
 src/plugins/cppeditor/cpphoverhandler.cpp | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/plugins/cppeditor/cpphoverhandler.cpp b/src/plugins/cppeditor/cpphoverhandler.cpp
index 66dc226e4d7..f32e6002dde 100644
--- a/src/plugins/cppeditor/cpphoverhandler.cpp
+++ b/src/plugins/cppeditor/cpphoverhandler.cpp
@@ -222,6 +222,9 @@ static FullySpecifiedType resolve(const FullySpecifiedType &ty,
         if (resolvedName)
             *resolvedName = nsTy->name();
 
+        if (resolvedSymbol)
+            *resolvedSymbol = const_cast<Namespace *>(nsTy);
+
     } else if (const Class *classTy = ty->asClassType()) {
         if (resolvedName)
             *resolvedName = classTy->name();
@@ -233,14 +236,23 @@ static FullySpecifiedType resolve(const FullySpecifiedType &ty,
         if (resolvedName)
             *resolvedName = fwdClassTy->name();
 
+        if (resolvedSymbol)
+            *resolvedSymbol = const_cast<ForwardClassDeclaration *>(fwdClassTy);
+
     } else if (const Enum *enumTy = ty->asEnumType()) {
         if (resolvedName)
             *resolvedName = enumTy->name();
 
+        if (resolvedSymbol)
+            *resolvedSymbol = const_cast<Enum *>(enumTy);
+
     } else if (const Function *funTy = ty->asFunctionType()) {
         if (resolvedName)
             *resolvedName = funTy->name();
 
+        if (resolvedSymbol)
+            *resolvedSymbol = const_cast<Function *>(funTy);
+
     }
 
     return ty;
-- 
GitLab