QxtMailMessage: Handle lines with only one word

This commit is contained in:
Adam Higerd 2011-04-25 09:40:24 -05:00
parent 2381ed5717
commit 315445f127

View File

@ -442,7 +442,12 @@ QByteArray QxtMailMessage::rfc2822() const
{
if (b[i] == '\n' || b[i] == '\r')
{
if (line.length() + word.length() + 1 <= 78)
if (line.isEmpty())
{
line = word;
word = "";
}
else if (line.length() + word.length() + 1 <= 78)
{
line = line + ' ' + word;
word = "";