diff --git a/src/widgets/splits/SplitInput.cpp b/src/widgets/splits/SplitInput.cpp index 2d94314ac..ba8a0418b 100644 --- a/src/widgets/splits/SplitInput.cpp +++ b/src/widgets/splits/SplitInput.cpp @@ -50,13 +50,13 @@ SplitInput::SplitInput(QWidget *parent, Split *_chatWidget, this->installEventFilter(this); this->initLayout(); - auto completer = - new QCompleter(&this->split_->getChannel()->completionModel); + auto *completer = + new QCompleter(&this->split_->getChannel()->completionModel, this); this->ui_.textEdit->setCompleter(completer); this->signalHolder_.managedConnect(this->split_->channelChanged, [this] { auto channel = this->split_->getChannel(); - auto completer = new QCompleter(&channel->completionModel); + auto *completer = new QCompleter(&channel->completionModel, this); this->ui_.textEdit->setCompleter(completer); }); @@ -76,6 +76,8 @@ SplitInput::SplitInput(QWidget *parent, Split *_chatWidget, }); } +SplitInput::~SplitInput() = default; + void SplitInput::initLayout() { auto app = getApp(); diff --git a/src/widgets/splits/SplitInput.hpp b/src/widgets/splits/SplitInput.hpp index 56504437a..96c4e2b82 100644 --- a/src/widgets/splits/SplitInput.hpp +++ b/src/widgets/splits/SplitInput.hpp @@ -24,7 +24,7 @@ class ResizingTextEdit; class ChannelView; enum class CompletionKind; -class SplitInput : public BaseWidget +class SplitInput final : public BaseWidget { Q_OBJECT @@ -32,6 +32,7 @@ public: SplitInput(Split *_chatWidget, bool enableInlineReplying = true); SplitInput(QWidget *parent, Split *_chatWidget, ChannelView *_channelView, bool enableInlineReplying = true); + ~SplitInput() override; bool hasSelection() const; void clearSelection() const;