From a1b66f3aa66e6f4b5391e2838293f6734a7fa59e Mon Sep 17 00:00:00 2001 From: Mathew Broady Date: Mon, 21 Dec 2020 10:59:46 +1100 Subject: [PATCH] Switch to newDisplayName() and newAvatarUrl() Removes build warnings that these are deprecated. See libQuotient commit f4db6988bf2fd71f74ac851557d82c6f65cc89b1 for more details. --- src/neochatroom.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/neochatroom.cpp b/src/neochatroom.cpp index 6df017fd2..4f5f8fb9f 100644 --- a/src/neochatroom.cpp +++ b/src/neochatroom.cpp @@ -367,17 +367,17 @@ QString NeoChatRoom::eventToString(const RoomEvent &evt, Qt::TextFormat format, } QString text {}; if (e.isRename()) { - if (e.displayName().isEmpty()) { + if (!e.newDisplayName().has_value()) { text = i18n("cleared their display name"); } else { - text = i18n("changed their display name to %1", e.displayName().toHtmlEscaped()); + text = i18n("changed their display name to %1", e.newDisplayName()->toHtmlEscaped()); } } if (e.isAvatarUpdate()) { if (!text.isEmpty()) { text += i18n(" and "); } - if (e.avatarUrl().isEmpty()) { + if (!e.newAvatarUrl().has_value()) { text += i18n("cleared their avatar"); } else if (e.prevContent()->avatarUrl) { text += i18n("set an avatar");