From 21cebeb8c1edafd1536889873a4ea8cbe3e77c9f Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Mon, 30 May 2022 10:35:21 +0300 Subject: [PATCH] kate: do not explicitly set codec from katencodingtest program if I set both the fallback and the codec to be used for saving I would not expect Kate to automatically choose other encoding (there is already a warning that data loss may occur if chosen encoding will not work). the test is just bogus and there is no option to fallback to encoding that will be able to save the data if the set encoding cannot encode the data - it is explicitly chosen Signed-off-by: Ivailo Monev --- kate/tests/encoding/kateencodingtest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kate/tests/encoding/kateencodingtest.cpp b/kate/tests/encoding/kateencodingtest.cpp index 3d71c6c4..7aed3ba9 100644 --- a/kate/tests/encoding/kateencodingtest.cpp +++ b/kate/tests/encoding/kateencodingtest.cpp @@ -43,7 +43,7 @@ int main (int argc, char *argv[]) // set codec buffer.setFallbackTextCodec (QTextCodec::codecForName ("ISO-8859-15")); - buffer.setTextCodec (QTextCodec::codecForName (encoding.toLatin1())); + // buffer.setTextCodec (QTextCodec::codecForName (encoding.toLatin1())); // switch to Mac EOL, this will test eol detection, as files are normal unix or dos buffer.setEndOfLineMode (Kate::TextBuffer::eolMac);