diff options
author | hjk <[email protected]> | 2009-07-14 11:21:52 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2009-07-14 11:23:32 +0200 |
commit | 4bf3d32f61ef545abed89641893e8e9248b878f1 (patch) | |
tree | a3a0578f55d7f8c8bf25d3ad15c6da5da81d8381 /src/plugins/debugger/watchutils.cpp | |
parent | 92a0f39fe1e9a13bfe746a83477b7a66bf4e5756 (diff) |
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.
Diffstat (limited to 'src/plugins/debugger/watchutils.cpp')
-rw-r--r-- | src/plugins/debugger/watchutils.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/debugger/watchutils.cpp b/src/plugins/debugger/watchutils.cpp index 4ca9b22b980..cd6c7e21b32 100644 --- a/src/plugins/debugger/watchutils.cpp +++ b/src/plugins/debugger/watchutils.cpp @@ -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('*'))) |