diff options
Diffstat (limited to 'Swift/QtUI/QtVCardWidget/QtVCardPhotoAndNameFields.cpp')
-rw-r--r-- | Swift/QtUI/QtVCardWidget/QtVCardPhotoAndNameFields.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardPhotoAndNameFields.cpp b/Swift/QtUI/QtVCardWidget/QtVCardPhotoAndNameFields.cpp index c8b010e..75b1f07 100644 --- a/Swift/QtUI/QtVCardWidget/QtVCardPhotoAndNameFields.cpp +++ b/Swift/QtUI/QtVCardWidget/QtVCardPhotoAndNameFields.cpp @@ -56,16 +56,13 @@ void QtVCardPhotoAndNameFields::setEditable(bool editable) { this->editable = editable; ui->avatarWidget->setEditable(editable); - ui->horizontalLayoutFN->setSpacing(editable ? 2 : 0); ui->lineEditFN->setVisible(editable); ui->labelFN->setVisible(!editable); - ui->horizontalLayoutNICKNAME->setSpacing(editable ? 2 : 0); ui->lineEditNICKNAME->setVisible(editable); ui->labelNICKNAME->setVisible(!editable); // prefix given middle last suffix - ui->horizontalLayoutFULLNAME->setSpacing(editable ? 2 : 0); ui->lineEditPREFIX->setVisible(editable); ui->lineEditGIVEN->setVisible(editable); ui->lineEditMIDDLE->setVisible(editable); @@ -79,7 +76,7 @@ void QtVCardPhotoAndNameFields::setEditable(bool editable) { for (QStringList::iterator i = fullname.begin(); i != fullname.end(); i++) { *i = i->trimmed(); } - ui->labelFULLNAME->setText(fullname.join(" ")); + ui->labelFULLNAME->setText((fullname.filter(QRegExp(".+"))).join(" ")); } void QtVCardPhotoAndNameFields::setAvatar(const ByteArray &data, const std::string &type) { |