From 77e9f522011889f739adc283a1b72629cf125a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Javier=20Merino=20Mor=C3=A1n?= Date: Mon, 30 May 2022 17:09:02 +0200 Subject: [PATCH] reportDecodingError() improvements Mostly fallout from not paying attention to it when resolving the conflict with 5888a377. Reporting parse errors (and many other things) can be enabled with: QT_LOGGING_RULES="org.kde.konsole.debug=true" --- src/Vt102Emulation.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Vt102Emulation.cpp b/src/Vt102Emulation.cpp index 66dfab48..182b1e6e 100644 --- a/src/Vt102Emulation.cpp +++ b/src/Vt102Emulation.cpp @@ -13,7 +13,6 @@ #include // Qt -#include #include #include #include @@ -2529,14 +2528,8 @@ static QString hexdump2(uint *s, int len) void Vt102Emulation::reportDecodingError(int token) { - resetTokenizer(); - - if (m_SixelStarted) { - SixelModeAbort(); - } - QString outputError = QStringLiteral("Undecodable sequence: "); - printf("token: %x\n", token); + switch (token & 0xff) { case 2: case 3: @@ -2572,7 +2565,13 @@ void Vt102Emulation::reportDecodingError(int token) outputError.append((token >> 16) & 0xff); } - qDebug() << outputError; + qCDebug(KonsoleDebug).noquote() << outputError; + + resetTokenizer(); + + if (m_SixelStarted) { + SixelModeAbort(); + } } void Vt102Emulation::sixelQuery(int q)