Fix bug that causes random crashes.
This commit is contained in:
@@ -5,7 +5,16 @@
|
||||
|
||||
#include "controller.h"
|
||||
|
||||
RoomListModel::RoomListModel(QMatrixClient::Connection* m_connection) : m_connection(m_connection) {
|
||||
RoomListModel::RoomListModel() {
|
||||
|
||||
}
|
||||
|
||||
RoomListModel::~RoomListModel() {
|
||||
|
||||
}
|
||||
|
||||
void RoomListModel::setConnection(QMatrixClient::Connection *conn) {
|
||||
m_connection = conn;
|
||||
beginResetModel();
|
||||
m_rooms.clear();
|
||||
connect(m_connection, &QMatrixClient::Connection::newRoom, this, &RoomListModel::addRoom);
|
||||
@@ -16,10 +25,6 @@ RoomListModel::RoomListModel(QMatrixClient::Connection* m_connection) : m_connec
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
RoomListModel::~RoomListModel() {
|
||||
|
||||
}
|
||||
|
||||
QMatrixClient::Room* RoomListModel::roomAt(int row) {
|
||||
return m_rooms.at(row);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user