logic: Fixed issues releated to real signatures in tooltips (issue #604)

* Fixed crash when signature was wrongly recorded
* Fixed line break at wrong position for template functions/methods
* Fixed already qualified name replace with qualified name, repeating qualifiers
This commit is contained in:
Eberhard Graether
2018-08-20 23:22:50 +02:00
parent c86f4d04dc
commit 023c6288d6
2 changed files with 39 additions and 5 deletions
+20 -1
View File
@@ -396,7 +396,26 @@ namespace utility
namePart.pop_back();
}
size_t splitPos = namePart.rfind(L' ');
size_t splitPos = std::wstring::npos;
parenCount = 0;
for (size_t i = namePart.size(); i > 0; i--)
{
const wchar_t c = namePart[i];
if (c == L'>' || c == L')')
{
parenCount++;
}
else if (c == L'<' || c == L'(')
{
parenCount--;
}
else if (!parenCount && c == L' ')
{
splitPos = i;
break;
}
}
if (splitPos != std::wstring::npos)
{
returnPart = namePart.substr(0, splitPos);