From a823cc9edcbf8593640e12923a091674c4a6ee37 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Wed, 24 Jul 2013 14:33:47 +0000 Subject: [PATCH] Fixed some utf8 issues in identities. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6538 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/Identity/IdDialog.cpp | 4 ++-- retroshare-gui/src/gui/Identity/IdEditDialog.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/retroshare-gui/src/gui/Identity/IdDialog.cpp b/retroshare-gui/src/gui/Identity/IdDialog.cpp index 130f5dc86..541615d9e 100644 --- a/retroshare-gui/src/gui/Identity/IdDialog.cpp +++ b/retroshare-gui/src/gui/Identity/IdDialog.cpp @@ -416,7 +416,7 @@ void IdDialog::insertIdDetails(uint32_t token) /* get GPG Details from rsPeers */ std::string ownPgpId = rsPeers->getGPGOwnId(); - ui.lineEdit_Nickname->setText(QString::fromStdString(data.mMeta.mGroupName)); + ui.lineEdit_Nickname->setText(QString::fromUtf8(data.mMeta.mGroupName.c_str())); ui.lineEdit_KeyId->setText(QString::fromStdString(data.mMeta.mGroupId)); ui.lineEdit_GpgHash->setText(QString::fromStdString(data.mPgpIdHash)); ui.lineEdit_GpgId->setText(QString::fromStdString(data.mPgpId)); @@ -425,7 +425,7 @@ void IdDialog::insertIdDetails(uint32_t token) { RsPeerDetails details; rsPeers->getGPGDetails(data.mPgpId, details); - ui.lineEdit_GpgName->setText(QString::fromStdString(details.name)); + ui.lineEdit_GpgName->setText(QString::fromUtf8(details.name.c_str())); } else { diff --git a/retroshare-gui/src/gui/Identity/IdEditDialog.cpp b/retroshare-gui/src/gui/Identity/IdEditDialog.cpp index 0a815d28b..de204ae84 100644 --- a/retroshare-gui/src/gui/Identity/IdEditDialog.cpp +++ b/retroshare-gui/src/gui/Identity/IdEditDialog.cpp @@ -117,7 +117,7 @@ void IdEditDialog::updateIdType(bool pseudo) ui.lineEdit_GpgId->setText(QString::fromStdString(gpgid)); ui.lineEdit_GpgHash->setText(tr("To be generated")); - ui.lineEdit_GpgName->setText(QString::fromStdString(details.name)); + ui.lineEdit_GpgName->setText(QString::fromUtf8(details.name.c_str())); } } @@ -183,7 +183,7 @@ void IdEditDialog::loadExistingId(uint32_t token) // force - incase it wasn't triggered. idTypeToggled(true); - ui.lineEdit_Nickname->setText(QString::fromStdString(data.mMeta.mGroupName)); + ui.lineEdit_Nickname->setText(QString::fromUtf8(data.mMeta.mGroupName.c_str())); ui.lineEdit_KeyId->setText(QString::fromStdString(data.mMeta.mGroupId)); if (realid) @@ -194,7 +194,7 @@ void IdEditDialog::loadExistingId(uint32_t token) { RsPeerDetails details; rsPeers->getGPGDetails(data.mPgpId, details); - ui.lineEdit_GpgName->setText(QString::fromStdString(details.name)); + ui.lineEdit_GpgName->setText(QString::fromUtf8(details.name.c_str())); ui.lineEdit_GpgId->setText(QString::fromStdString(data.mPgpId)); } @@ -217,7 +217,7 @@ void IdEditDialog::updateId() RsGxsIdGroup rid; // Must set, Nickname, KeyId(if existing), mIdType, GpgId. - rid.mMeta.mGroupName = ui.lineEdit_Nickname->text().toStdString(); + rid.mMeta.mGroupName = ui.lineEdit_Nickname->text().toUtf8().constData(); if (rid.mMeta.mGroupName.size() < 2) { @@ -242,7 +242,7 @@ void IdEditDialog::updateId() //rid.mGpgId = ui.lineEdit_GpgId->text().toStdString(); rid.mPgpIdHash = ui.lineEdit_GpgHash->text().toStdString(); - //rid.mGpgName = ui.lineEdit_GpgName->text().toStdString(); + //rid.mGpgName = ui.lineEdit_GpgName->text().toUtf8().constData(); } else {