aboutsummaryrefslogtreecommitdiff
path: root/lib/user.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-08-02 19:25:59 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-08-02 19:25:59 +0200
commit38f3f752d4cac7f155e25af36357a4c6445d885f (patch)
tree469aecfa0f8c673989c9628f658064e84b71540f /lib/user.cpp
parent6d40d7b8cc40259e451636e3a372de08d075553b (diff)
downloadlibquotient-38f3f752d4cac7f155e25af36357a4c6445d885f.tar.gz
libquotient-38f3f752d4cac7f155e25af36357a4c6445d885f.zip
User: fix FTBFS and access after move
Diffstat (limited to 'lib/user.cpp')
-rw-r--r--lib/user.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/user.cpp b/lib/user.cpp
index b610573d..09cf72a2 100644
--- a/lib/user.cpp
+++ b/lib/user.cpp
@@ -99,7 +99,7 @@ void User::Private::setNameForRoom(const Room* r, QString newName,
Q_ASSERT(totalRooms > 1);
QElapsedTimer et;
if (totalRooms > MIN_JOINED_ROOMS_TO_LOG) {
- qCDebug(MAIN) << "Switching the most used name of user" << userId
+ qCDebug(MAIN) << "Switching the most used name of user" << id
<< "from" << mostUsedName << "to" << newName;
qCDebug(MAIN) << "The user is in" << totalRooms << "rooms";
et.start();
@@ -152,7 +152,7 @@ void User::Private::setAvatarForRoom(const Room* r, const QUrl& newUrl,
QElapsedTimer et;
if (totalRooms > MIN_JOINED_ROOMS_TO_LOG) {
qCInfo(MAIN)
- << "Switching the most used avatar of user" << userId
+ << "Switching the most used avatar of user" << id
<< "from" << mostUsedAvatar.url().toDisplayString() << "to"
<< newUrl.toDisplayString();
et.start();
@@ -161,7 +161,7 @@ void User::Private::setAvatarForRoom(const Room* r, const QUrl& newUrl,
auto nextMostUsedIt = otherAvatar(newUrl);
if (nextMostUsedIt == otherAvatars.end()) {
qCCritical(MAIN)
- << userId << "doesn't have" << newUrl.toDisplayString()
+ << id << "doesn't have" << newUrl.toDisplayString()
<< "in otherAvatars though it seems to be used in"
<< newUrlUsage << "rooms";
Q_ASSERT(false);
@@ -186,7 +186,7 @@ void User::Private::setAvatarForRoom(const Room* r, const QUrl& newUrl,
User::User(QString userId, Connection* connection)
: QObject(connection), d(new Private(move(userId)))
{
- setObjectName(userId);
+ setObjectName(id());
}
Connection* User::connection() const