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:
parent
e4633087fa
commit
dfec934ff0
|
@ -121,7 +121,7 @@ ChatFormHeader::ChatFormHeader(QWidget* parent)
|
|||
nameLabel->setMinimumHeight(Style::getFont(Style::Medium).pixelSize());
|
||||
nameLabel->setEditable(true);
|
||||
nameLabel->setTextFormat(Qt::PlainText);
|
||||
connect(nameLabel, &CroppingLabel::editFinished, this, &ChatFormHeader::onNameChanged);
|
||||
connect(nameLabel, &CroppingLabel::editFinished, this, &ChatFormHeader::nameChanged);
|
||||
|
||||
headTextLayout = new QVBoxLayout();
|
||||
headTextLayout->addStretch();
|
||||
|
@ -303,11 +303,3 @@ void ChatFormHeader::addStretch()
|
|||
{
|
||||
headTextLayout->addStretch();
|
||||
}
|
||||
|
||||
void ChatFormHeader::onNameChanged(const QString& name)
|
||||
{
|
||||
if (!name.isEmpty()) {
|
||||
nameLabel->setText(name);
|
||||
emit nameChanged(name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,6 @@ signals:
|
|||
void callRejected();
|
||||
|
||||
private slots:
|
||||
void onNameChanged(const QString& name);
|
||||
void retranslateUi();
|
||||
void updateButtonsView();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user