Browse Source

refactor: Give ChatFormHeader an out-of-line destructor.

This makes the class more widely usable, since deallocating an object of
this class no longer needs to have the `CallConfirmWidget` definition
present. The header file forward-declares `CallConfirmWidget`, so it's
not a complete type if only `chatformheader.h` is included.
reviewable/pr5260/r1
iphydf 7 years ago
parent
commit
4fa257bf66
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
  1. 2
      src/widget/chatformheader.cpp
  2. 1
      src/widget/chatformheader.h

2
src/widget/chatformheader.cpp

@ -156,6 +156,8 @@ ChatFormHeader::ChatFormHeader(QWidget* parent) @@ -156,6 +156,8 @@ ChatFormHeader::ChatFormHeader(QWidget* parent)
Translator::registerHandler(std::bind(&ChatFormHeader::retranslateUi, this), this);
}
ChatFormHeader::~ChatFormHeader() = default;
void ChatFormHeader::setName(const QString& newName)
{
nameLabel->setText(newName);

1
src/widget/chatformheader.h

@ -55,6 +55,7 @@ public: @@ -55,6 +55,7 @@ public:
};
ChatFormHeader(QWidget* parent = nullptr);
~ChatFormHeader();
void setName(const QString& newName);
void setMode(Mode mode);

Loading…
Cancel
Save