Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(alias): allow clearing alias from chatformheader
Browse files Browse the repository at this point in the history
Now has the same logic as FriendWidget. Before clearing the field would result in no change being made, instead of clearing the alias.
  • Loading branch information
anthonybilinski committed Apr 8, 2019
1 parent e463308 commit dfec934
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
10 changes: 1 addition & 9 deletions src/widget/chatformheader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -303,11 +303,3 @@ void ChatFormHeader::addStretch()
{
headTextLayout->addStretch();
}

void ChatFormHeader::onNameChanged(const QString& name)
{
if (!name.isEmpty()) {
nameLabel->setText(name);
emit nameChanged(name);
}
}
1 change: 0 additions & 1 deletion src/widget/chatformheader.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ class ChatFormHeader : public QWidget
void callRejected();

private slots:
void onNameChanged(const QString& name);
void retranslateUi();
void updateButtonsView();

Expand Down

0 comments on commit dfec934

Please sign in to comment.