From 5977e61a02557523fd2e5f9b3a6e84f6327b4194 Mon Sep 17 00:00:00 2001 From: selsta Date: Sat, 7 May 2022 18:26:32 +0200 Subject: [PATCH] qt: remove QTextCodec QTextCodec is removed in Qt6 --- src/qt/KeysFiles.cpp | 2 +- src/qt/ipc.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qt/KeysFiles.cpp b/src/qt/KeysFiles.cpp index bcbb4ba0..05f93608 100644 --- a/src/qt/KeysFiles.cpp +++ b/src/qt/KeysFiles.cpp @@ -128,7 +128,7 @@ void WalletKeysFilesModel::findWallets(const QString &moneroAccountsDir) if(fileExists(wallet + ".address.txt")){ QFile file(wallet + ".address.txt"); file.open(QFile::ReadOnly | QFile::Text); - QString _address = QTextCodec::codecForMib(106)->toUnicode(file.readAll()); + QString _address = QString(file.readAll()); if(!_address.isEmpty()){ address = _address; diff --git a/src/qt/ipc.cpp b/src/qt/ipc.cpp index a48cc8f8..dff7626d 100644 --- a/src/qt/ipc.cpp +++ b/src/qt/ipc.cpp @@ -109,8 +109,7 @@ void IPC::handleConnection(){ clientConnection, &QLocalSocket::deleteLater); clientConnection->waitForReadyRead(2); - QByteArray cmdArray = clientConnection->readAll(); - QString cmdString = QTextCodec::codecForMib(106)->toUnicode(cmdArray); // UTF-8 + QString cmdString = QString(clientConnection->readAll()); qDebug() << cmdString; this->parseCommand(cmdString);