Hi, thanks for the patch.
Some note:

There is no reason to use QPointer. (or is it?)

QString::null is deprecated in QT4, use QString().
Why did you change some QLatin1String to QString::fromLatin1 ?

in setBody( QTextDocument , MessageFormat ) ,  the default argument of 
MessageFormat should be richtext.  i would say it is not even required to add 
the MessageFormat argument.

Also, the MessageFormat sementics should probably be changed.
(using Qt::TextFormat in constructor, but using setPlainBody and setHtmlBody 
in favor of setBody, which lead to lots of errors)


about removing \n, this is correct to do that, at least for jabber.



Le samedi 7 avril 2007, Charles Connell a écrit :
> I've started over again on a patch I sent in a few weeks ago. I still have
> not profiled this, for lack of time and training. This patch can be
> committed with (I believe) no effect on other code.
>
> Since QTextDocument returns a full HTML document from its toHtml() method,
> I have used regular expressions to strip it off <html> and </html>, <body>
> and </body>, and everything between and including <head> and </head>. This
> leaves some tags like <p> and <font>, which I believe are OK to still be
> around. I could only test it on AIM, so I don't know how other protocols
> behave to different tags.
>
> When I gave my last patch, I included constructors using QTextDocument* and
> QString for the body parameter. I was told not to do this, so this patch
> only had QString body constructors. I believe that both types of
> constructor can be useful, however, because something like ChatTextEditPart
> can give Message a QTextDocument* without ever needing to convert to
> QString and back again. However, in every other case, QString is used for
> the body, so it's not so significant.
>
> I cleaned up the doxygen comments in the header file, but I haven't figured
> out how to generate apidox, so I don't know if the parse correctly.
>
> I've been working on this with developer snapshot 3, and the diff is to svn
> trunk, so I hope the committer will work out what I did and what I didn't
> do, except, since I'm afraid to mess with the diff files. (see hints below)
>
> Also, sorry there's two diff files. I couldn't use svn diff so this was the
> easiest thing next to a recursive diff.
>
> ~Charles Connell
>
> Notes to committer
>
> I modified my code to use the same functions as are in the svn code, but
> there are differences in implementation. Here are some details:
> - I added isRightToLeft to Message::Private, but not the isRightToLeft()
> function to Message, which is already in svn, and should stay there
> - I made meaningful changes to setBody(QString,...),
> doSetBody(QString,...), plainBody(), escapedBody(), parsedBody()
> - I added the functions setBody (QTextDocument*,...),
> doSetBody(QTextDocument*,...), QTextDocument* body()
> - The did not make changes to unescape(), makeRegExp(), parseLinks(), those
> were made by someone else and should be left as they are in svn


Attachment: pgpwlhiblQtLn.pgp
Description: PGP signature

_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to