| 35 | } |
| 36 | |
| 37 | void RoomListModel::setConnection(QMatrixClient::Connection* connection) |
| 38 | { |
| 39 | beginResetModel(); |
| 40 | m_connection = connection; |
| 41 | m_rooms.clear(); |
| 42 | connect( connection, &QMatrixClient::Connection::newRoom, this, &RoomListModel::addRoom ); |
| 43 | for( QMatrixClient::Room* room: connection->roomMap().values() ) { |
| 44 | connect( room, &QMatrixClient::Room::namesChanged, this, &RoomListModel::namesChanged ); |
| 45 | m_rooms.append(room); |
| 46 | } |
| 47 | endResetModel(); |
| 48 | } |
| 49 | |
| 50 | QMatrixClient::Room* RoomListModel::roomAt(int row) |
| 51 | { |
nothing calls this directly
no outgoing calls
no test coverage detected