Skip to content

Commit c920235

Browse files
committed
fix: also support ' and , as branch visualization characters
My objdump from arch uses these chars now, so let's support them too
1 parent 221d60e commit c920235

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/resultsdisassemblypage.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,11 @@ class BranchDelegate : public QStyledItemDelegate
142142
startHorizontalLine(x);
143143
verticalLine();
144144
break;
145+
case '\'':
145146
case '\\':
146147
topRightEdge();
147148
break;
149+
case ',':
148150
case '/':
149151
bottomLeftEdge();
150152
break;

tests/modeltests/tst_disassemblyoutput.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,10 @@ private slots:
243243
QVERIFY(result.errorMessage.isEmpty());
244244

245245
auto isValidVisualisationCharacter = [](QChar character) {
246-
const static auto validCharacters = std::initializer_list<QChar> {
247-
QLatin1Char(' '), QLatin1Char('\t'), QLatin1Char('|'), QLatin1Char('/'), QLatin1Char('\\'),
248-
QLatin1Char('-'), QLatin1Char('>'), QLatin1Char('+'), QLatin1Char('X')};
246+
const static auto validCharacters =
247+
std::initializer_list<QChar> {QLatin1Char(' '), QLatin1Char('\t'), QLatin1Char('|'), QLatin1Char('/'),
248+
QLatin1Char('\\'), QLatin1Char('-'), QLatin1Char('>'), QLatin1Char('+'),
249+
QLatin1Char('X'), QLatin1Char(','), QLatin1Char('\'')};
249250

250251
return std::any_of(validCharacters.begin(), validCharacters.end(),
251252
[character](auto validCharacter) { return character == validCharacter; });

0 commit comments

Comments
 (0)