allow 30 unicode symbols for identity name, instead of 30 bytes

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8205 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
electron128 2015-05-02 07:57:59 +00:00
parent 735a27f8da
commit e663fa608c
2 changed files with 5 additions and 4 deletions

View File

@ -59,6 +59,7 @@ extern RsIdentity *rsIdentity;
#define RSRECOGN_MAX_TAGINFO 5 #define RSRECOGN_MAX_TAGINFO 5
// Unicode symbols. NOT utf-8 bytes, because of multi byte characters
#define RSID_MAXIMUM_NICKNAME_SIZE 30 #define RSID_MAXIMUM_NICKNAME_SIZE 30
std::string rsIdTypeToString(uint32_t idtype); std::string rsIdTypeToString(uint32_t idtype);

View File

@ -480,7 +480,7 @@ void IdEditDialog::submit()
void IdEditDialog::createId() void IdEditDialog::createId()
{ {
std::string groupname = ui->lineEdit_Nickname->text().toUtf8().constData(); QString groupname = ui->lineEdit_Nickname->text();
if (groupname.size() < 2) if (groupname.size() < 2)
{ {
@ -495,7 +495,7 @@ void IdEditDialog::createId()
return; return;
} }
RsIdentityParameters params; RsIdentityParameters params;
params.nickname = groupname; params.nickname = groupname.toUtf8().constData();
params.isPgpLinked = (ui->radioButton_GpgId->isChecked()); params.isPgpLinked = (ui->radioButton_GpgId->isChecked());
if (!mAvatar.isNull()) if (!mAvatar.isNull())
@ -535,7 +535,7 @@ void IdEditDialog::idCreated(uint32_t token)
void IdEditDialog::updateId() void IdEditDialog::updateId()
{ {
/* submit updated details */ /* submit updated details */
std::string groupname = ui->lineEdit_Nickname->text().toUtf8().constData(); QString groupname = ui->lineEdit_Nickname->text();
if (groupname.size() < 2) if (groupname.size() < 2)
{ {
@ -550,7 +550,7 @@ void IdEditDialog::updateId()
return; return;
} }
mEditGroup.mMeta.mGroupName = groupname; mEditGroup.mMeta.mGroupName = groupname.toUtf8().constData();
if (!mAvatar.isNull()) if (!mAvatar.isNull())
{ {