diff options
author | Andre Hartmann <aha_1980@gmx.de> | 2021-06-24 16:05:27 +0200 |
---|---|---|
committer | André Hartmann <aha_1980@gmx.de> | 2021-06-29 11:09:04 +0000 |
commit | a659f445c7664f35a88466fc0870f816bd3cdab9 (patch) | |
tree | d9042ccda397b98fae4d4364b6943b2fcbe41fc8 /src/plugins/debugger/sourceutils.cpp | |
parent | 4271b3a299c2dc367d010fdc2e8399cad747affb (diff) | |
download | qt-creator-a659f445c7664f35a88466fc0870f816bd3cdab9.tar.gz |
Debugger: Escape special chars in line annotation
By re-using the existing function quoteUnprintable()
and moving their code as escapeUnprintable() to
watchutils.
In contrast to the watches window, where the escaping
can be disabled by the context menu, the line annotations
are always escaped for simplicity.
Change-Id: I76adfd7cd70ec92ff0d7f7ea41fc30ae0057cad0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/debugger/sourceutils.cpp')
-rw-r--r-- | src/plugins/debugger/sourceutils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/debugger/sourceutils.cpp b/src/plugins/debugger/sourceutils.cpp index fbb57679d6..f54f222c6e 100644 --- a/src/plugins/debugger/sourceutils.cpp +++ b/src/plugins/debugger/sourceutils.cpp @@ -414,7 +414,7 @@ static void setValueAnnotationsHelper(BaseTextEditor *textEditor, const QString expression = expressionUnderCursor(tc); if (expression.isEmpty()) continue; - const QString value = values.take(expression); // Show value one only once. + const QString value = escapeUnprintable(values.take(expression)); // Show value one only once. if (value.isEmpty()) continue; const QString annotation = QString("%1: %2").arg(expression, value); |