From a2a57db88f658605cd6449f757d18defdd0e5c98 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Thu, 31 Aug 2023 19:24:07 +0300 Subject: [PATCH] kdesudo: pass the comment argument as-is from KdeSudo constructor internally KCmdLineArgs converts from and to the current locale encoding Signed-off-by: Ivailo Monev --- kdesudo/kdesudo.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kdesudo/kdesudo.cpp b/kdesudo/kdesudo.cpp index 818d3e6b..3ce708c5 100644 --- a/kdesudo/kdesudo.cpp +++ b/kdesudo/kdesudo.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include @@ -89,9 +88,7 @@ KdeSudo::KdeSudo(const QString &icon, const QString &appname) // Parsins args /* Get the comment out of cli args */ - QByteArray commentBytes = args->getOption("comment").toUtf8(); - QTextCodec *tCodecConv = QTextCodec::codecForLocale(); - QString comment = tCodecConv->toUnicode(commentBytes, commentBytes.size()); + QString comment = args->getOption("comment"); if (args->isSet("f")) { // If file is writeable, do not change uid