Merge changes from upstream 0.17.0 branch.

This commit is contained in:
Filippo Scognamiglio
2021-06-06 18:26:35 +02:00
90 changed files with 4903 additions and 1408 deletions
+16 -4
View File
@@ -34,9 +34,11 @@
// Konsole
#include "konsole_wcwidth.h"
#include <cwctype>
using namespace Konsole;
PlainTextDecoder::PlainTextDecoder()
: _output(0)
: _output(nullptr)
, _includeTrailingWhitespace(true)
, _recordLinePositions(false)
{
@@ -58,7 +60,7 @@ void PlainTextDecoder::begin(QTextStream* output)
}
void PlainTextDecoder::end()
{
_output = 0;
_output = nullptr;
}
void PlainTextDecoder::setRecordLinePositions(bool record)
@@ -80,6 +82,16 @@ void PlainTextDecoder::decodeLine(const Character* const characters, int count,
_linePositions << pos;
}
// check the real length
for (int i = 0 ; i < count ; i++)
{
if (characters + i == nullptr)
{
count = i;
break;
}
}
//TODO should we ignore or respect the LINE_WRAPPED line property?
//note: we build up a QString and send it to the text stream rather writing into the text
@@ -112,7 +124,7 @@ void PlainTextDecoder::decodeLine(const Character* const characters, int count,
}
HTMLDecoder::HTMLDecoder() :
_output(0)
_output(nullptr)
,_colorTable(base_color_table)
,_innerSpanOpen(false)
,_lastRendition(DEFAULT_RENDITION)
@@ -142,7 +154,7 @@ void HTMLDecoder::end()
*_output << QString::fromStdWString(text);
_output = 0;
_output = nullptr;
}