[Konversation-devel] [Bug 247882] Realnames in nicklist: No awareness of formatting chars
Peter Simonsson
peter.simonsson at gmail.com
Sun Aug 15 13:55:56 CEST 2010
https://bugs.kde.org/show_bug.cgi?id=247882
Peter Simonsson <peter.simonsson at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #1 from Peter Simonsson <peter simonsson gmail com> 2010-08-15 13:55:54 ---
commit a64122d8b578e0adc9680bc1ad3a8b0d7fb20631
Author: Peter Simonsson <peter.simonsson at 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
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Konversation-devel
mailing list