[prev in list] [next in list] [prev in thread] [next in thread]
List: kopete-devel
Subject: [kopete-devel] Bad use of ChatMessagePart::formatName() ?
From: Detlev Casanova <detlev.casanova () gmail ! com>
Date: 2009-01-10 23:40:19
Message-ID: 200901110040.19723.detlev.casanova () gmail ! com
[Download RAW message or body]
Hey,
There is a problem with the "is typing" notification in the chat window.
if a contact's name is <Etienne/>, the name <Etienne/> is shown correctly in
the ChatMessagePart but when the contact is composing a message, I am notified
in the bottom of the chat window "<etienne></etienne> is typing a message..."
I had a look at the source code and found that the name is processed by
ChatMessagePart::formatName() before it is used. the second argument that is
passed to the function is Qt::PlainText and switching it to Qt::RichText
solves the problem (see the attached patch).
Is there any reason why Qt::PlainText is used instead of Qt::RichText ?
Also, the comment describing the method does not really tell what it does.
Does it change the text to "format" or does it return a printable text from a
text in "format" ?
Cheers,
Detlev Casanova
["chatview.patch" (text/x-patch)]
Index: chatview.cpp
===================================================================
--- chatview.cpp (revision 906281)
+++ chatview.cpp (working copy)
@@ -451,7 +451,7 @@
for( it = m_remoteTypingMap.begin(); it != m_remoteTypingMap.end(); ++it )
{
const Kopete::Contact *c = it.key();
- typingList.append( m_messagePart->formatName(c, Qt::PlainText) );
+ typingList.append( m_messagePart->formatName(c, Qt::RichText) );
}
// Update the status area
_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic