forked from qt-creator/qt-creator
		
	Code model: Fix endless loop in AbstractEditorSupport::functionAt
used by CDB debugger tooltip (introduced by
 A 354b9712e4).
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
Rubber-stamped-by: dt
			
			
This commit is contained in:
		| @@ -73,17 +73,14 @@ QString AbstractEditorSupport::functionAt(const CppModelManagerInterface *modelM | ||||
|                     const CPlusPlus::Overview o; | ||||
|                     QString rc = o.prettyName(function->name()); | ||||
|                     // Prepend namespace "Foo::Foo::foo()" up to empty root namespace | ||||
|                     for (const CPlusPlus::Symbol *owner = function; ; ) { | ||||
|                         if (const CPlusPlus::Scope *nameSpace = owner->enclosingNamespace()) { | ||||
|                             const QString name = o.prettyName(nameSpace->name()); | ||||
|                             if (name.isEmpty()) { | ||||
|                                 break; | ||||
|                             } else { | ||||
|                                 rc.prepend(QLatin1String("::")); | ||||
|                                 rc.prepend(name); | ||||
|                             } | ||||
|                         } else { | ||||
|                     for (const CPlusPlus::Symbol *owner = function->enclosingNamespace(); | ||||
|                          owner; owner = owner->enclosingNamespace()) { | ||||
|                         const QString name = o.prettyName(owner->name()); | ||||
|                         if (name.isEmpty()) { | ||||
|                             break; | ||||
|                         } else { | ||||
|                             rc.prepend(QLatin1String("::")); | ||||
|                             rc.prepend(name); | ||||
|                         } | ||||
|                     } | ||||
|                     return rc; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user