Summary: | Realnames in nicklist: No awareness of formatting chars | ||
---|---|---|---|
Product: | [Applications] konversation | Reporter: | Jonas Thiem <contact> |
Component: | general | Assignee: | Konversation Developers <konversation-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.3.1 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Jonas Thiem
2010-08-14 19:50:13 UTC
commit a64122d8b578e0adc9680bc1ad3a8b0d7fb20631 Author: Peter Simonsson <peter.simonsson@gmail.com> Date: Sun Aug 15 13:57:10 2010 +0200 Remove irc markup from real name in nicklist. Also clean up the code a bit. BUG:247882 diff --git a/src/irc/nick.cpp b/src/irc/nick.cpp index cef0043..298eafb 100644 --- a/src/irc/nick.cpp +++ b/src/irc/nick.cpp @@ -150,16 +150,18 @@ QString Nick::calculateLabel1() const NickInfoPtr nickinfo = getChannelNick()->getNickInfo(); KABC::Addressee addressee = nickinfo->getAddressee(); + QString retString = nickinfo->getNickname(); + if(!addressee.realName().isEmpty()) //if no addressee, realName will be empty { - return nickinfo->getNickname() + " (" + addressee.realName() + ')'; + retString += " (" + Konversation::removeIrcMarkup(addressee.realName()) + ')'; } else if(Preferences::self()->showRealNames() && !nickinfo->getRealName().isEmpty()) { - return nickinfo->getNickname() + " (" + nickinfo->getRealName() + ')'; + retString += " (" + Konversation::removeIrcMarkup(nickinfo->getRealName()) + ')'; } - return nickinfo->getNickname(); + return retString; } QString Nick::calculateLabel2() const |