diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-04-27 13:28:35 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-04-27 13:28:35 +0900 |
commit | e74e48507f68e36c289c5dbe4b75f32a6910f3c1 (patch) | |
tree | 95fdc4b566d0ad0e15899c439aa004b199ac67b3 /lib/user.cpp | |
parent | 9be5c32d812a55ca55e1cf80d8e29fe593c85a62 (diff) | |
download | libquotient-e74e48507f68e36c289c5dbe4b75f32a6910f3c1.tar.gz libquotient-e74e48507f68e36c289c5dbe4b75f32a6910f3c1.zip |
User::rawName(); bonus, bring order to doc comments
This new function allows to get the username along with its bridge
(basically, undoing the change applied by processEvent for cases when it
is undesirable).
Diffstat (limited to 'lib/user.cpp')
-rw-r--r-- | lib/user.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/user.cpp b/lib/user.cpp index f469128c..88d20276 100644 --- a/lib/user.cpp +++ b/lib/user.cpp @@ -220,6 +220,12 @@ QString User::name(const Room* room) const return d->nameForRoom(room); } +QString User::rawName(const Room* room) const +{ + return d->bridged.isEmpty() ? name(room) : + name(room) % " (" % d->bridged % ')'; +} + void User::updateName(const QString& newName, const Room* room) { updateName(newName, d->nameForRoom(room), room); |