Don't use separete lines in headers, that contain only blanks. Not that this wouldn't be legal, but it doesn't look nice. -      if (!result.isEmpty() && !(result.right(2) == "\n ") && -        result.length() - result.findRev("\n ") + encLength + 2 > maxLen) +      int lastNewLine = result.findRev("\n "); +      if (!result.mid(lastNewLine).stripWhiteSpace().isEmpty() +        && result.length() - lastNewLine + encLength + 2 > maxLen)
Don't use separete lines in headers, that contain only blanks.
Not that this wouldn't be legal, but it doesn't look nice.
-      if (!result.isEmpty() && !(result.right(2) == "\n ") &&
-        result.length() - result.findRev("\n ") + encLength + 2 > maxLen)
+      int lastNewLine = result.findRev("\n ");
+      if (!result.mid(lastNewLine).stripWhiteSpace().isEmpty()
+        && result.length() - lastNewLine + encLength + 2 > maxLen)

svn path=/trunk/kdenetwork/kmail/; revision=102541

lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi