From 355f00c2bd6f4b2870133d0423420ef8046b7156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 14 Jan 2021 02:37:59 +0100 Subject: Added controlled conversions to char* instead of automatic ascii conversions. The definition of -UTQT_NO_ASCII_CAST is no longer needed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- src/torclient.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/torclient.cpp') diff --git a/src/torclient.cpp b/src/torclient.cpp index 27c9477..c3efc5a 100644 --- a/src/torclient.cpp +++ b/src/torclient.cpp @@ -378,7 +378,7 @@ void TorClient::authenticate() if (TorkConfig::generateRandomPassword()){ crypto_seed_rng(); sendToServer(TQString("setconf HashedControlPassword=16:%2") - .arg(hashPassword(crypto_rand_string(16)))); + .arg(hashPassword(crypto_rand_string(16).latin1()))); } } @@ -839,7 +839,7 @@ void TorClient::parseServer(const TQString &info) if (gi){ int country_id = 0; - country_id = GeoIP_id_by_name(gi, ip); + country_id = GeoIP_id_by_name(gi, ip.latin1()); cc = GeoIP_country_name[country_id]; GeoIP_delete(gi); }else @@ -1258,7 +1258,7 @@ bool TorClient::noSpecialProcessing(const TDEConfigSkeletonItem* it) crypto_seed_rng(); sendToServer(TQString("setconf %1=16:%2") .arg((*it).name()) - .arg(hashPassword(crypto_rand_string(16)))); + .arg(hashPassword(crypto_rand_string(16).latin1()))); return false; } return true; -- cgit v1.2.1