Fix memory leaks
This commit is contained in:
committed by
Tobias Fella
parent
7313386903
commit
6dce1564b7
@@ -18,6 +18,7 @@ class StateFilterModel : public QSortFilterProxyModel
|
||||
QML_ELEMENT
|
||||
|
||||
public:
|
||||
using QSortFilterProxyModel::QSortFilterProxyModel;
|
||||
/**
|
||||
* @brief Custom filter function checking if an event type has been filtered out.
|
||||
*
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
CompletionModel::CompletionModel(QObject *parent)
|
||||
: QAbstractListModel(parent)
|
||||
, m_filterModel(new CompletionProxyModel())
|
||||
, m_filterModel(new CompletionProxyModel(this))
|
||||
, m_emojiModel(new QConcatenateTablesProxyModel(this))
|
||||
{
|
||||
connect(this, &CompletionModel::textChanged, this, &CompletionModel::updateCompletion);
|
||||
|
||||
@@ -26,6 +26,8 @@ class CompletionProxyModel : public QSortFilterProxyModel
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
using QSortFilterProxyModel::QSortFilterProxyModel;
|
||||
|
||||
/**
|
||||
* @brief Wether a row should be shown or not.
|
||||
*
|
||||
|
||||
@@ -27,6 +27,8 @@ class UserFilterModel : public QSortFilterProxyModel
|
||||
Q_PROPERTY(bool allowEmpty READ allowEmpty WRITE setAllowEmpty NOTIFY allowEmptyChanged)
|
||||
|
||||
public:
|
||||
using QSortFilterProxyModel::QSortFilterProxyModel;
|
||||
|
||||
/**
|
||||
* @brief Custom filter function checking boith the display name and matrix ID.
|
||||
*
|
||||
|
||||
@@ -93,8 +93,6 @@ std::optional<std::reference_wrapper<const Quotient::RoomEvent>> MessageModel::g
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
static NeochatRoomMember *emptyNeochatRoomMember = new NeochatRoomMember;
|
||||
|
||||
QVariant MessageModel::data(const QModelIndex &idx, int role) const
|
||||
{
|
||||
if (!checkIndex(idx, QAbstractItemModel::CheckIndexOption::IndexIsValid)) {
|
||||
|
||||
Reference in New Issue
Block a user