Version: 1.9.1 (using KDE KDE 3.5.2) Installed from: Gentoo Packages Compiler: gcc version 3.4.6 (Gentoo 3.4.6, ssp-3.4.5-1.0, pie-8.7.9) OS: Linux When pressing V on a message, the source code is incorrectly displayed; the lines after Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit are missing. I'll try to create an attachment with the message, i hope it's not too big, but it seems it has something to do with the size of the message.
Created attachment 15905 [details] Message which is not displayed properly
I cannot reproduce. With my KMail 1.9.1, everything works fine. Does this happen to you with other messages too?
I've noticed some inconsistencies in the displayed source of some emails before, but generally the messages are displayed ok. With this particular message (the one attached before), the display error occured with all attachments in the message. If i deleted some of them, the source was showing up properly. I'll provide some screenshots on Monday, and more messages with problems if i stumble across some.
Created attachment 15977 [details] Difference between source display and real meesage Here is a screenshot with the problem. I tried to change the font of the message source viewer to match the one in kate, but i couldn't (should i ask for a feature? :P or am I blind and I didn't see where to change it).
I've checked with another machine running Gentoo, Kmail 1.9.1 and the same happens. Unfortunately, it's a machine on the same subnet, using the same mail server (therefore same configurations). If you need any more informations on packages installed, libs, feel free to ask.
I'm sorry, you are right. I rechecked, and the part you indicated is not shown. The problem is with how QTextEdit handles text files. When the text format is set to Qt::LogText , it is not rendered as plain text, but rather as a limited html. Therefore, certain parts are not shown. A possible fix is: Index: mailsourceviewer.cpp =================================================================== --- mailsourceviewer.cpp (revision 541373) +++ mailsourceviewer.cpp (working copy) @@ -74,11 +74,15 @@ void MailSourceViewer::setText( const QS delete mSourceHighLighter; mSourceHighLighter = 0; if ( text.length() > 500000 ) { setTextFormat( Qt::LogText ); + QString sanitized_text = text; + sanitized_text.replace('<',"<"); + sanitized_text.replace('>',">"); + KTextBrowser::setText( sanitized_text ); } else { setTextFormat( Qt::PlainText ); mSourceHighLighter = new MailSourceHighlighter( this ); + KTextBrowser::setText( text ); } - KTextBrowser::setText( text ); } } But since by definition this requires a large QString to be deep copied, and since this bug is rather minor, I'm hesitant to commit. I will fix it in trunk nevertheless, along with subclassing MailSourceViewer from a read-only KTextEdit instead of KTextBrowser, since a browser looks like overkill.
Ismail: I have a very old patch here which subclasses MailSourceViewer from a read-only QTextEdit. I just never got around to committing the patch. But I guess it's not worth sending you the patch because apart from replacing KTextBrowser by QTextEdit it adds setReadOnly( true ); to the c'tor. And deep copying the QString is really not a good idea. After all, we are using Qt::LogText instead of Qt::PlainText for large messages in order to keep the memory usage low. Maybe in Qt4 this is no longer necessary.
I can't confirm the bug in kde 4.1.1 . The test-case is shown correctly from what I saw.
I tried reproducing this by sending me the message the reporter attached. Works for me on 4.10.1.