debugger: assume that not-known-to-be-simple types have children

This might lead to false positives in corner cases like empty structures
but speed up the display of arrays and lists of user-defined types a lot.
This commit is contained in:
hjk
2009-07-14 11:21:52 +02:00
parent 92a0f39fe1
commit 4bf3d32f61
3 changed files with 26 additions and 2 deletions

View File

@@ -337,6 +337,17 @@ bool isIntOrFloatType(const QString &type)
return isIntType(type) || types.contains(type);
}
GuessChildrenResult guessChildren(const QString &type)
{
if (isIntOrFloatType(type))
return HasNoChildren;
if (isPointerType(type))
return HasChildren;
if (type.endsWith(QLatin1String("QString")))
return HasNoChildren;
return HasPossiblyChildren;
}
QString sizeofTypeExpression(const QString &type)
{
if (type.endsWith(QLatin1Char('*')))