diff options
author | Friedemann Kleint <[email protected]> | 2009-07-10 14:36:28 +0200 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2009-07-10 14:36:28 +0200 |
commit | abf5e3ddc39b8f4971f61fb9f8dccdb1d4635bf5 (patch) | |
tree | 04ea8668ecac1c3922da8ccaabc78e067d196535 /src/plugins/debugger/watchutils.cpp | |
parent | b0227ce4968a5095fbbef6cb8e7a6f7752ecf0c0 (diff) |
Enabled the use of Debugger-specific watch/locals models.
- Modified WatchModel to handle storage of an hierarchy
of WatchItems.
- Factored out code for asynchronous population to
AsyncWatchModel and added a mixin for convenient
handling
- Added base class for synchronous models.
- Implement simple, synchronous models for CDB, greatly
simplifying code and finally getting manual
expansion right.
Signed-off-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/debugger/watchutils.cpp')
-rw-r--r-- | src/plugins/debugger/watchutils.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/plugins/debugger/watchutils.cpp b/src/plugins/debugger/watchutils.cpp index 83486e899e9..7eccb04cd9e 100644 --- a/src/plugins/debugger/watchutils.cpp +++ b/src/plugins/debugger/watchutils.cpp @@ -554,19 +554,22 @@ QList<WatchData> QtDumperResult::toWatchData(int source) const } wchild.setType(dchild.type.isEmpty() ? childType : dchild.type); wchild.setAddress(dchild.address); - // Child overrides. - const int effectiveChildChildCount = dchild.childCount == -1 ? childChildCount : dchild.childCount; - switch (effectiveChildChildCount) { + // Child overrides. Note that WatchData::setType sets + // childcount = 0 for some known types. + if (wchild.isHasChildrenNeeded()) { + const int effectiveChildChildCount = dchild.childCount == -1 ? childChildCount : dchild.childCount; + switch (effectiveChildChildCount) { case -1: - wchild.setChildrenNeeded(); - wchild.setHasChildrenNeeded(); - break; + wchild.setChildrenNeeded(); + wchild.setHasChildrenNeeded(); + break; case 0: - wchild.setHasChildren(false); - break; + wchild.setHasChildren(false); + break; default: - wchild.setHasChildren(true); - break; + wchild.setHasChildren(true); + break; + } } } } |