D8290: Remove more memory allocations during header parsing

Daniel Vrátil noreply at phabricator.kde.org
Sat Oct 14 11:05:20 BST 2017


dvratil created this revision.
dvratil added a reviewer: vkrause.
Restricted Application added a project: KDE PIM.
Restricted Application added a subscriber: KDE PIM.

REVISION SUMMARY
  Avoid allocating dpointer when using QByteArray::fromRawData() by
  introducing unfoldHeader() and Header::from7BitString() overloads
  that work on const char* + size_t pair - this actually works nicely
  for Structured headers which internally operate on raw char* pointers
  instead of QByteArrays, so we avoid constructing a additional temporary
  QByteArray in this case.
  
  Note that this is an ABI incompatible change, make sure you rebuild
  everything properly otherwise you'll get some really weird crashes.

REPOSITORY
  R180 PIM: KMime

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D8290

AFFECTED FILES
  CMakeLists.txt
  src/kmime_header_parsing.cpp
  src/kmime_headerfactory.cpp
  src/kmime_headerfactory_p.h
  src/kmime_headers.cpp
  src/kmime_headers.h
  src/kmime_util.cpp
  src/kmime_util.h

To: dvratil, vkrause
Cc: #kde_pim, dvasin, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20171014/98876158/attachment.html>


More information about the kde-pim mailing list