[Patch] Webdav properties in UDSAtoms
David Faure
david at mandrakesoft.com
Fri May 31 16:07:06 BST 2002
On Friday 31 May 2002 16:47, Hamish Rodda wrote:
> On Sat, 1 Jun 2002 00:22, David Faure wrote:
> > On Friday 31 May 2002 16:11, Hamish Rodda wrote:
> > > One question though... with this XML being in utf8, why are we using a
> > > QCString instead of using a QString and calling utf8()?
> >
> > The latter would require a conversion, whereas QCString is already in the
> > right encoding - if you receive _and_ send utf8, and don't do string
> > manipulation (and use length() too often), I think a QCString makes more
> > sense.
>
> Ah, I see. When converting the QString provided by metaData() (which contains
> XML provided by the application), I should call utf8(), right?
Depends what you do with it.
If you're passing it to a QDomDocument, better give it a QString.
Reason:
bool QDomDocument::setContent( const QCString& buffer, bool namespaceProcessing, QString *errorMsg, int *errorLine, int
*errorColumn )
{
return setContent( QString::fromUtf8( buffer, buffer.length() ), namespaceProcessing, errorMsg, errorLine, errorCol
umn );
}
bool QDomDocument::setContent( const QString& text, QString *errorMsg, int *errorLine, int *errorColumn )
{
return setContent( text, FALSE, errorMsg, errorLine, errorColumn );
}
;)
--
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KDE, Making The Future of Computing Available Today
More information about the kfm-devel
mailing list