aboutsummaryrefslogtreecommitdiff
path: root/lib/room.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-08-30 12:35:27 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-08-30 12:36:14 +0200
commit06a8ef6ebed5962117121486059ba46dc7f6d4f9 (patch)
treec2557b9ca8818ed93f520286d132a321c838b894 /lib/room.cpp
parentf005f3b69651bd6d6f58879804e1281f6c08177a (diff)
downloadlibquotient-06a8ef6ebed5962117121486059ba46dc7f6d4f9.tar.gz
libquotient-06a8ef6ebed5962117121486059ba46dc7f6d4f9.zip
Room: displayNameForHtml
This is useful for cases when the room display name is returned to QML that doesn't have an equivalent of QString::toHtmlEscaped().
Diffstat (limited to 'lib/room.cpp')
-rw-r--r--lib/room.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index 45f1af53..890da13d 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -549,6 +549,11 @@ QString Room::canonicalAlias() const
QString Room::displayName() const { return d->displayname; }
+QString Room::displayNameForHtml() const
+{
+ return displayName().toHtmlEscaped();
+}
+
void Room::refreshDisplayName() { d->updateDisplayname(); }
QString Room::topic() const