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
<br/>, 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, `&emsp;` or similar doesn't work, as
the appendHtml() replaces multiple spaces with one.
This commit is contained in:
Lion 2023-08-30 08:25:42 +02:00 committed by GitHub
parent 238dd62165
commit 8f707e4a69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -229,10 +229,10 @@ void ConsoleWidget::executeCommand(const QString &command)
RVA oldOffset = Core()->getOffset(); RVA oldOffset = Core()->getOffset();
commandTask = QSharedPointer<CommandTask>( commandTask = QSharedPointer<CommandTask>(
new CommandTask(command, CommandTask::ColorMode::MODE_256, true)); new CommandTask(command, CommandTask::ColorMode::MODE_256, false));
connect(commandTask.data(), &CommandTask::finished, this, connect(commandTask.data(), &CommandTask::finished, this,
[this, cmd_line, command, oldOffset](const QString &result) { [this, cmd_line, command, oldOffset](const QString &result) {
ui->outputTextEdit->appendHtml(result); ui->outputTextEdit->appendPlainText(result);
scrollOutputToEnd(); scrollOutputToEnd();
historyAdd(command); historyAdd(command);
commandTask.clear(); commandTask.clear();