From 8f707e4a697afd5893d22129a205b4c0d8c95d89 Mon Sep 17 00:00:00 2001 From: Lion Date: Wed, 30 Aug 2023 08:25:42 +0200 Subject: [PATCH] append rizin results in plaintext to include tabs etc (fixes #3193) (#3236) the output of rizin was formatted as html, which caused \n to become
, making it impossible to just use appendPlainText() as-is. We have to tell rizin not to give us html, so that we can use \t in the output. Simply replacing \t with spaces, ` ` or similar doesn't work, as the appendHtml() replaces multiple spaces with one. --- src/widgets/ConsoleWidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/ConsoleWidget.cpp b/src/widgets/ConsoleWidget.cpp index de0e6892..63f0ab65 100644 --- a/src/widgets/ConsoleWidget.cpp +++ b/src/widgets/ConsoleWidget.cpp @@ -229,10 +229,10 @@ void ConsoleWidget::executeCommand(const QString &command) RVA oldOffset = Core()->getOffset(); commandTask = QSharedPointer( - new CommandTask(command, CommandTask::ColorMode::MODE_256, true)); + new CommandTask(command, CommandTask::ColorMode::MODE_256, false)); connect(commandTask.data(), &CommandTask::finished, this, [this, cmd_line, command, oldOffset](const QString &result) { - ui->outputTextEdit->appendHtml(result); + ui->outputTextEdit->appendPlainText(result); scrollOutputToEnd(); historyAdd(command); commandTask.clear();