From dcf23e0ccb37b5276439987758330227289328c0 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Mon, 13 Feb 2012 21:09:38 +0000 Subject: [PATCH] Fixed usage of utf8 characters in certificate links (gpg and location name) (Patch from Asamk) git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4935 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/RetroShareLink.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/retroshare-gui/src/gui/RetroShareLink.cpp b/retroshare-gui/src/gui/RetroShareLink.cpp index 9348fcdab..db8e064f3 100644 --- a/retroshare-gui/src/gui/RetroShareLink.cpp +++ b/retroshare-gui/src/gui/RetroShareLink.cpp @@ -298,8 +298,6 @@ bool RetroShareLink::createCertificate(const std::string& ssl_id) } //_ssl_id = QString::fromStdString(id); - _name = QString::fromUtf8(detail.name.c_str()); - QString gpg_cert = QString::fromStdString(invite) ; QString gpg_base_64 = QString::fromStdString(invite).section("\n\n",1).section("-----",0,0) ; _GPGBase64CheckSum = gpg_base_64.section("=",-1,-1).section("\n",0,0) ; @@ -310,8 +308,8 @@ bool RetroShareLink::createCertificate(const std::string& ssl_id) _GPGid = QString::fromStdString(detail.gpg_id).right(8); _SSLid = QString::fromStdString(ssl_id) ; _GPGBase64String = gpg_base_64.replace("\n","") ; - _location = QString::fromStdString(detail.location) ; - _name = QString::fromStdString(detail.name) ; + _location = QString::fromUtf8(detail.location.c_str()) ; + _name = QString::fromUtf8(detail.name.c_str()) ; _ext_ip_port = QString::fromStdString(invite).section("--EXT--",1,1) ; QString lst = QString::fromStdString(invite).section("--EXT--",0,0) ; @@ -627,7 +625,7 @@ QString RetroShareLink::niceName() const } if(type() == TYPE_CERTIFICATE) - return QString("RetroShare Certificate (") + _name + ", @ " + _location + ")" ; // should add SSL id there + return QString("RetroShare Certificate (%1, @%2)").arg(_name, _location); // should add SSL id there return name(); }