From 1558cdbbf767478e1521d3121a1e726d58c6201c Mon Sep 17 00:00:00 2001 From: Slávek Banko Date: Wed, 23 Jun 2021 17:48:22 +0200 Subject: Added controlled conversions to char* instead of automatic ascii conversions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 07a5ffc33a3ab0c337836bc83c94cf8b5ab09e46) --- src/otrlconfinterface.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/otrlconfinterface.cpp') diff --git a/src/otrlconfinterface.cpp b/src/otrlconfinterface.cpp index 812326d..5b4f6f0 100644 --- a/src/otrlconfinterface.cpp +++ b/src/otrlconfinterface.cpp @@ -83,7 +83,7 @@ bool OtrlConfInterface::hasPrivFingerprint( TQString accountId, TQString protoco void OtrlConfInterface::generateNewPrivKey( TQString accountId, TQString protocol ){ - PrivKeyPopup *popup = new PrivKeyPopup( preferencesDialog, i18n("Generating private key"), TQt::WType_Dialog | TQt::WStyle_StaysOnTop ); + PrivKeyPopup *popup = new PrivKeyPopup( preferencesDialog, i18n("Generating private key").utf8(), TQt::WType_Dialog | TQt::WStyle_StaysOnTop ); KAnimWidget *anim = new KAnimWidget( "kde", 72, popup->animFrame, "kopete" ); anim->start(); anim->show(); @@ -115,7 +115,7 @@ TQValueList OtrlConfInterface::readAllFingerprints(){ entry[1] = i18n("Unused"); } else { if (context && context->msgstate == OTRL_MSGSTATE_ENCRYPTED) { - if (context->active_fingerprint->trust && context->active_fingerprint->trust[0] != NULL) { + if (context->active_fingerprint->trust && context->active_fingerprint->trust[0] != 0) { entry[1] = i18n("Private"); } else { entry[1] = i18n("Unverified"); @@ -149,7 +149,7 @@ void OtrlConfInterface::verifyFingerprint( TQString strFingerprint, bool trust ) otrl_context_set_trust( fingerprint, NULL ); } kdDebug() << "Writing fingerprints" << endl; - otrl_privkey_write_fingerprints( userstate, TQString(TDEGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" ); + otrl_privkey_write_fingerprints( userstate, TQString("%1%2").arg(TDEGlobal::dirs()->saveLocation("data", "kopete_otr/", true )).arg("fingerprints").local8Bit() ); } else { kdDebug() << "could not find fingerprint" << endl; } @@ -158,7 +158,7 @@ void OtrlConfInterface::verifyFingerprint( TQString strFingerprint, bool trust ) bool OtrlConfInterface::isVerified( TQString strFingerprint ){ Fingerprint *fingerprint; - fingerprint = findFingerprint( strFingerprint ); + fingerprint = findFingerprint( strFingerprint.latin1() ); if( fingerprint->trust && fingerprint->trust[0] ){ kdDebug() << "found trust" << endl; @@ -175,7 +175,7 @@ void OtrlConfInterface::forgetFingerprint( TQString strFingerprint ){ fingerprint = findFingerprint( strFingerprint ); otrl_context_forget_fingerprint( fingerprint, 1 ); - otrl_privkey_write_fingerprints( userstate, TQString(TDEGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" ); + otrl_privkey_write_fingerprints( userstate, TQString("%1%2").arg(TDEGlobal::dirs()->saveLocation("data", "kopete_otr/", true )).arg("fingerprints").local8Bit() ); } Fingerprint *OtrlConfInterface::findFingerprint( TQString strFingerprint ){ -- cgit v1.2.3