diff options
author | Christian Stenger <christian.stenger@qt.io> | 2019-07-16 10:31:03 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2019-07-23 12:26:09 +0000 |
commit | 24d9ad7c1127c436d4ae5f14ae7f17c61325928b (patch) | |
tree | 52fa932f0af765d00d33254770d0527fed0f2722 /share/qtcreator/debugger | |
parent | 93c403e444be96a00c32b4d6fbd831c55a35afcc (diff) |
Dumper: Adapt QC internal dumper to renamed class
FileName is now FilePath. Follow the approach that is used
internal to display the summary of the file path as the
content of its URL if non-empty and the content of the file
otherwise.
Keep the old approach as well as it can still be used,
even in new code thanks to a using declaration and fallback
to the old approach if debugging old source.
Change-Id: I37c621e451fea92ca34db9a63b5ca26b3bdc201c
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'share/qtcreator/debugger')
-rw-r--r-- | share/qtcreator/debugger/creatortypes.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/share/qtcreator/debugger/creatortypes.py b/share/qtcreator/debugger/creatortypes.py index 087619eb4a..5c049e482f 100644 --- a/share/qtcreator/debugger/creatortypes.py +++ b/share/qtcreator/debugger/creatortypes.py @@ -191,10 +191,19 @@ def qdump__CPlusPlus__Internal__Value(d, value): d.putValue(value["l"]) d.putPlainChildren(value) -def qdump__Utils__FileName(d, value): - d.putStringValue(value) +def qdump__Utils__FilePath(d, value): + try: + if not d.extractPointer(value["m_url"]): # there is no valid URL + d.putStringValue(value["m_data"]) + else: + d.putItem(value["m_url"]) + except: + d.putStringValue(value) # support FileName before 4.10 as well d.putPlainChildren(value) +def qdump__Utils__FileName(d, value): + qdump__Utils__FilePath(d, value) + def qdump__Utils__ElfSection(d, value): d.putByteArrayValue(value["name"]) d.putPlainChildren(value) |