Debugger: Show base class names simplified

Especially for highly templated code it's awful to have the
name column populated by 'std::basic_string<...' gibberish.

Change-Id: I7344bed77a0e29cf88f031e1a663ed6c4c1c7b51
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
hjk
2014-07-03 11:01:53 +02:00
parent 977db80425
commit ca9e2dd9d7

View File

@@ -41,6 +41,7 @@
#include "watchutils.h"
#include <utils/algorithm.h>
#include <utils/basetreeview.h>
#include <utils/qtcassert.h>
#include <utils/savedaction.h>
@@ -1070,6 +1071,14 @@ QString WatchModel::displayName(const WatchItem *item) const
result = QLatin1Char('*') + item->parent->name;
else
result = removeNamespaces(item->name);
// Simplyfy names that refer to base classes.
if (result.startsWith(QLatin1Char('['))) {
result = simplifyType(result);
if (result.size() > 30)
result = result.leftRef(27) + QLatin1String("...]");
}
return result;
}