@@ -105,7 +105,7 @@ ChatDocumentHandler::ChatDocumentHandler(QObject *parent)
|
||||
{
|
||||
connect(this, &ChatDocumentHandler::roomChanged, this, [this]() {
|
||||
m_completionModel->setRoom(m_room);
|
||||
static NeoChatRoom *previousRoom = nullptr;
|
||||
static QPointer<NeoChatRoom> previousRoom = nullptr;
|
||||
if (previousRoom) {
|
||||
disconnect(previousRoom, &NeoChatRoom::chatBoxTextChanged, this, nullptr);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QObject>
|
||||
#include <QPointer>
|
||||
|
||||
class NeoChatRoom;
|
||||
|
||||
@@ -70,7 +71,7 @@ private Q_SLOTS:
|
||||
void avatarChanged(Quotient::User *user, const Quotient::Room *context);
|
||||
|
||||
private:
|
||||
NeoChatRoom *m_currentRoom;
|
||||
QPointer<NeoChatRoom> m_currentRoom;
|
||||
QList<Quotient::User *> m_users;
|
||||
|
||||
int findUserPos(Quotient::User *user) const;
|
||||
|
||||
Reference in New Issue
Block a user