forked from qt-creator/qt-creator
If automatic dereferencing of pointers is enabled, the "Value" and "Type" columns for pointers hold the values for the dereferenced pointers. In order to have a consistent behavior for the "Name" column as well, prepend '*'s to indicate that the variable/expression has actually been dereferenced. Add parantheses around the original expression if it doesn't match a simple regex for variable names, to avoid that the leading '*' changes the meaning of the expression (so e.g. a dereferenced 'somepointer + 1' is displayed as '*(somepointer + 1)' rather than '*somepointer + 1'). This introduces a new 'autoderefcount' field to propagate the information how many levels of dereferencing have taken place from the Python to the C++ side, which is then used to add the leading '*'s for the display name. Fixes: QTCREATORBUG-20907 Change-Id: Ia9a41cb42e25ba72a6d980a765dbe2b454deb8c8 Reviewed-by: hjk <hjk@qt.io>
160 KiB
160 KiB