aboutsummaryrefslogtreecommitdiff
path: root/room.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'room.cpp')
-rw-r--r--room.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/room.cpp b/room.cpp
index 1c9063c9..d79363a3 100644
--- a/room.cpp
+++ b/room.cpp
@@ -213,6 +213,7 @@ RoomEventPtr TimelineItem::replaceEvent(RoomEventPtr&& other)
Room::Room(Connection* connection, QString id, JoinState initialJoinState)
: QObject(connection), d(new Private(connection, id, initialJoinState))
{
+ setObjectName(id);
// See "Accessing the Public Class" section in
// https://marcmutz.wordpress.com/translated-articles/pimp-my-pimpl-%E2%80%94-reloaded/
d->q = this;
@@ -757,7 +758,7 @@ void Room::Private::removeMember(User* u)
}
}
-QString Room::roomMembername(User *u) const
+QString Room::roomMembername(const User* u) const
{
// See the CS spec, section 11.2.2.3
@@ -1239,6 +1240,7 @@ void Room::processStateEvents(const RoomEvents& events)
case EventType::RoomCanonicalAlias: {
auto aliasEvent = static_cast<RoomCanonicalAliasEvent*>(event);
d->canonicalAlias = aliasEvent->alias();
+ setObjectName(d->canonicalAlias);
qCDebug(MAIN) << "Room canonical alias updated:" << d->canonicalAlias;
emitNamesChanged = true;
break;