[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: QCString construction
From:       Ingo =?iso-8859-15?q?Kl=F6cker?= <kloecker () kde ! org>
Date:       2007-02-11 21:18:49
Message-ID: 200702112218.54535 () erwin ! ingo-kloecker ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Saturday 10 February 2007 02:16, David Faure wrote:
> This leads me to 3 patches.
>
> One for kmail, I wrote a utility function for creating a QCString
> from char*+size, and used that when creating a QCString from a
> DwString where it matters (i.e. where I found pretty large strings to
> be used when attaching large files).

The related changes look good. I'm just wondering why you didn't add
  QCString CString( const DwString & str )
instead of (or additionally to)
  QCString CString( const char* str, size_t strLen )
?

This would allow us to do
-  return asDwString().c_str();
+  return KMail::Util::CString( asDwString() );
instead of
-  return asDwString().c_str();
+  const DwString& asString = asDwString();
+  return KMail::Util::CString( asString.c_str(), asString.length() );

> Can a kmail developer review the change to KMMessage::asString() and
> asSendableString(), too? It avoids a asString() (Assemble) and a
> fromString (Parse), but I hope it's doing the right thing.

I am very uneasy about those changes because completely different things 
happen when you copy a message and when you create a message from a 
string. If we had unit tests... But as it stands I'm against those 
changes.

Regards,
Ingo

[Attachment #5 (application/pgp-signature)]

_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic