MCPcopy Create free account
hub / github.com/davidar/tensor / setConnection

Method setConnection

client/models/roomlistmodel.cpp:37–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void 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
50QMatrixClient::Room* RoomListModel::roomAt(int row)
51{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected