aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-08-07 22:14:06 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-08-07 22:14:06 +0200
commitbf6303c41264d913ca049009034aa948464b8f30 (patch)
tree6c6184fce21f43e2699382a41075c9a79d812b98
parentf81aa4d723577ce30518424510e45ef39ff0e29e (diff)
downloadlibquotient-bf6303c41264d913ca049009034aa948464b8f30.tar.gz
libquotient-bf6303c41264d913ca049009034aa948464b8f30.zip
User::avatar: add const
-rw-r--r--lib/user.cpp6
-rw-r--r--lib/user.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/user.cpp b/lib/user.cpp
index 04afed2b..a7e0efd9 100644
--- a/lib/user.cpp
+++ b/lib/user.cpp
@@ -197,18 +197,18 @@ const Avatar& User::avatarObject(const Room* room) const
return d->otherAvatars.try_emplace(mediaId, url).first->second;
}
-QImage User::avatar(int dimension, const Room* room)
+QImage User::avatar(int dimension, const Room* room) const
{
return avatar(dimension, dimension, room);
}
-QImage User::avatar(int width, int height, const Room* room)
+QImage User::avatar(int width, int height, const Room* room) const
{
return avatar(width, height, room, [] {});
}
QImage User::avatar(int width, int height, const Room* room,
- const Avatar::get_callback_t& callback)
+ const Avatar::get_callback_t& callback) const
{
return avatarObject(room).get(connection(), width, height, callback);
}
diff --git a/lib/user.h b/lib/user.h
index e4560843..4ff62951 100644
--- a/lib/user.h
+++ b/lib/user.h
@@ -99,11 +99,11 @@ public:
*/
const Avatar& avatarObject(const Room* room = nullptr) const;
Q_INVOKABLE QImage avatar(int dimension,
- const Quotient::Room* room = nullptr);
+ const Quotient::Room* room = nullptr) const;
Q_INVOKABLE QImage avatar(int requestedWidth, int requestedHeight,
- const Quotient::Room* room = nullptr);
+ const Quotient::Room* room = nullptr) const;
QImage avatar(int width, int height, const Room* room,
- const Avatar::get_callback_t& callback);
+ const Avatar::get_callback_t& callback) const;
QString avatarMediaId(const Room* room = nullptr) const;
QUrl avatarUrl(const Room* room = nullptr) const;