forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user