1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(alias): allow clearing alias from chatformheader

Now has the same logic as FriendWidget. Before clearing the field would result in no change being made, instead of clearing the alias.
This commit is contained in:
Anthony Bilinski 2019-04-08 02:58:02 -07:00
parent e4633087fa
commit dfec934ff0
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
2 changed files with 1 additions and 10 deletions

View File

@ -121,7 +121,7 @@ ChatFormHeader::ChatFormHeader(QWidget* parent)
nameLabel->setMinimumHeight(Style::getFont(Style::Medium).pixelSize()); nameLabel->setMinimumHeight(Style::getFont(Style::Medium).pixelSize());
nameLabel->setEditable(true); nameLabel->setEditable(true);
nameLabel->setTextFormat(Qt::PlainText); nameLabel->setTextFormat(Qt::PlainText);
connect(nameLabel, &CroppingLabel::editFinished, this, &ChatFormHeader::onNameChanged); connect(nameLabel, &CroppingLabel::editFinished, this, &ChatFormHeader::nameChanged);
headTextLayout = new QVBoxLayout(); headTextLayout = new QVBoxLayout();
headTextLayout->addStretch(); headTextLayout->addStretch();
@ -303,11 +303,3 @@ void ChatFormHeader::addStretch()
{ {
headTextLayout->addStretch(); headTextLayout->addStretch();
} }
void ChatFormHeader::onNameChanged(const QString& name)
{
if (!name.isEmpty()) {
nameLabel->setText(name);
emit nameChanged(name);
}
}

View File

@ -91,7 +91,6 @@ signals:
void callRejected(); void callRejected();
private slots: private slots:
void onNameChanged(const QString& name);
void retranslateUi(); void retranslateUi();
void updateButtonsView(); void updateButtonsView();