diff options
author | Sami Shalayel <[email protected]> | 2025-04-02 12:03:56 +0200 |
---|---|---|
committer | Sami Shalayel <[email protected]> | 2025-04-04 14:51:28 +0200 |
commit | a951832b74749cde7832ee906df087ac857f5cbd (patch) | |
tree | 797731b0e367e33d9b3e8dca203fbde56cd99f4f /src/qmlcompiler/qqmljsbasicblocks.cpp | |
parent | bf6b29fbe87d01e5fa3066b29593f3315c3acfe0 (diff) |
qqmljsbasicblocks: escape <> when dumping dot files
It turns out that <> characters need to be escaped in the dot format.
They are emitted by the `SetUnwindHandler <null>` instruction.
Change-Id: I279cd29cde8501007e388b027c4fe2e9e18ce38c
Reviewed-by: Olivier De Cannière <[email protected]>
Diffstat (limited to 'src/qmlcompiler/qqmljsbasicblocks.cpp')
-rw-r--r-- | src/qmlcompiler/qqmljsbasicblocks.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qmlcompiler/qqmljsbasicblocks.cpp b/src/qmlcompiler/qqmljsbasicblocks.cpp index 0d4de5ecec..4e60dea6e3 100644 --- a/src/qmlcompiler/qqmljsbasicblocks.cpp +++ b/src/qmlcompiler/qqmljsbasicblocks.cpp @@ -71,6 +71,7 @@ void QQmlJSBasicBlocks::dumpDOTGraph() m_context->lineAndStatementNumberMapping); dump = dump.replace(" "_L1, " "_L1); // prevent collapse of extra whitespace for formatting dump = dump.replace("\n"_L1, "\\l"_L1); // new line + left aligned + dump = dump.replace("<"_L1, "\\<"_L1).replace(">"_L1, "\\>"_L1); // escape < and > for "SetUnwindHandler <null>" instruction s << " %1 [shape=record, fontname=\"Monospace\", label=\"{Block %1: | %2}\"]\n"_L1 .arg(QString::number(blockOffset)) .arg(dump); |