The pretty printers already had a pretty approach for empty
containers, these got an 'empty ' prepended to their output.
But when you are printing large containers, how do you know the
size of the container? Often, it's not straight forward to get
to the size, e.g. for a QList. To help the user of the debugger,
always append '(size = N)' to the output, which works for all
situations. Remove the empty prefix, which is now obsolete.
Details
Details
- Reviewers
dfaure kfunk - Group Reviewers
KDevelop - Commits
- R32:c08cd8060f4b: GDB Qt pretty printers: print size of container
Diff Detail
Diff Detail
- Repository
- R32 KDevelop
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
I like the idea in general, but not really the string representation of the size.
Instead of size = N, let's do at least size: N?
Or less "exact" code-wise, but more phonetic: N entries for N > 0, else empty.