242 if (!next && node->type() == Node::Class && |
243 if (!next && node->type() == Node::Class && |
243 (findFlags & SearchBaseClasses)) { |
244 (findFlags & SearchBaseClasses)) { |
244 NodeList baseClasses = allBaseClasses(static_cast<const ClassNode *>(node)); |
245 NodeList baseClasses = allBaseClasses(static_cast<const ClassNode *>(node)); |
245 foreach (const Node *baseClass, baseClasses) { |
246 foreach (const Node *baseClass, baseClasses) { |
246 if (i == path.size() - 1) |
247 if (i == path.size() - 1) |
247 next = static_cast<const InnerNode *>(baseClass)-> |
248 next = static_cast<const InnerNode *>(baseClass)->findFunctionNode(path.at(i)); |
248 findFunctionNode(path.at(i)); |
|
249 else |
249 else |
250 next = static_cast<const InnerNode *>(baseClass)->findNode(path.at(i)); |
250 next = static_cast<const InnerNode *>(baseClass)->findNode(path.at(i)); |
251 |
251 |
252 if (next) |
252 if (next) |
253 break; |
253 break; |
254 } |
254 } |
255 } |
255 } |
256 |
256 |
257 node = next; |
257 node = next; |
258 } |
258 } |
259 if (node && i == path.size() && node->type() == Node::Function) { |
259 if (node && i == path.size() && node->isFunction()) { |
260 // CppCodeParser::processOtherMetaCommand ensures that reimplemented |
260 // CppCodeParser::processOtherMetaCommand ensures that reimplemented |
261 // functions are private. |
261 // functions are private. |
262 const FunctionNode *func = static_cast<const FunctionNode*>(node); |
262 const FunctionNode *func = static_cast<const FunctionNode*>(node); |
263 |
|
264 while (func->access() == Node::Private) { |
263 while (func->access() == Node::Private) { |
265 const FunctionNode *from = func->reimplementedFrom(); |
264 const FunctionNode *from = func->reimplementedFrom(); |
266 if (from != 0) { |
265 if (from != 0) { |
267 if (from->access() != Node::Private) |
266 if (from->access() != Node::Private) |
268 return from; |
267 return from; |
269 else |
268 else |
270 func = from; |
269 func = from; |
271 } else |
270 } |
|
271 else |
272 break; |
272 break; |
273 } |
273 } |
274 return func; |
274 return func; |
275 } |
275 } |
276 relative = relative->parent(); |
276 relative = relative->parent(); |
301 int findFlags) const |
301 int findFlags) const |
302 { |
302 { |
303 const Node *parent = findNode(parentPath, relative, findFlags); |
303 const Node *parent = findNode(parentPath, relative, findFlags); |
304 if (parent == 0 || !parent->isInnerNode()) { |
304 if (parent == 0 || !parent->isInnerNode()) { |
305 return 0; |
305 return 0; |
306 } else { |
306 } |
|
307 else { |
307 return ((InnerNode *)parent)->findFunctionNode(clone); |
308 return ((InnerNode *)parent)->findFunctionNode(clone); |
308 } |
309 } |
309 } |
310 } |
310 |
311 |
311 static const int NumSuffixes = 3; |
312 static const int NumSuffixes = 3; |