(valobj, internal_dict)
| 251 | |
| 252 | |
| 253 | def QByteArraySummaryProvider(valobj, internal_dict): |
| 254 | if valobj.IsValid(): |
| 255 | content = valobj.GetChildMemberWithName('(content)') |
| 256 | if content.IsValid(): |
| 257 | summary = content.GetSummary() |
| 258 | if summary is not None: |
| 259 | # unlike QString, we quoted the (content) twice to preserve our own quotation, |
| 260 | # must undo the quotation done by GetSummary |
| 261 | return 'b' + unquote(summary) |
| 262 | # Something wrong with our synthetic provider, get the content by ourselves |
| 263 | printable, _, _ = printableQByteArray(valobj) |
| 264 | if printable is not None: |
| 265 | # first replace " to \", and surround by "", no need to escape other things which |
| 266 | # are handled in printableQByteArray. |
| 267 | return 'b"{}"'.format(printable.replace('"', '\\"')) |
| 268 | return '<Invalid>' |
| 269 | |
| 270 | |
| 271 | class QByteArrayFormatter(HiddenMemberProvider): |
nothing calls this directly
no test coverage detected