Hello community, here is the log from the commit of package kmime for openSUSE:Factory checked in at 2019-02-14 14:18:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kmime (Old) and /work/SRC/openSUSE:Factory/.kmime.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kmime" Thu Feb 14 14:18:44 2019 rev:43 rq:673791 version:18.12.2 Changes: -------- --- /work/SRC/openSUSE:Factory/kmime/kmime.changes 2019-01-21 10:14:11.742446718 +0100 +++ /work/SRC/openSUSE:Factory/.kmime.new.28833/kmime.changes 2019-02-14 14:18:47.312062339 +0100 @@ -1,0 +2,11 @@ +Sat Feb 09 08:25:13 UTC 2019 - [email protected] + +- Update to 18.12.2 + * New bugfix release + * For more details please see: + * https://www.kde.org/announcements/announce-applications-18.12.2.php +- Changes since 18.12.1: + * Allow to detect attachment when mail use alternative + * Add more autotest + +------------------------------------------------------------------- Old: ---- kmime-18.12.1.tar.xz New: ---- kmime-18.12.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kmime.spec ++++++ --- /var/tmp/diff_new_pack.zju103/_old 2019-02-14 14:18:48.876061584 +0100 +++ /var/tmp/diff_new_pack.zju103/_new 2019-02-14 14:18:48.876061584 +0100 @@ -22,7 +22,7 @@ %{!?_kapp_version: %define _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')} %bcond_without lang Name: kmime -Version: 18.12.1 +Version: 18.12.2 Release: 0 Summary: KDE PIM libraries MIME support License: LGPL-2.1-or-later ++++++ kmime-18.12.1.tar.xz -> kmime-18.12.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-18.12.1/CMakeLists.txt new/kmime-18.12.2/CMakeLists.txt --- old/kmime-18.12.1/CMakeLists.txt 2019-01-08 01:18:17.000000000 +0100 +++ new/kmime-18.12.2/CMakeLists.txt 2019-02-05 01:45:46.000000000 +0100 @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.0) -set(PIM_VERSION "5.10.1") +set(PIM_VERSION "5.10.2") project(KMime VERSION ${PIM_VERSION}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-18.12.1/autotests/attachmenttest.cpp new/kmime-18.12.2/autotests/attachmenttest.cpp --- old/kmime-18.12.1/autotests/attachmenttest.cpp 2018-12-14 07:00:55.000000000 +0100 +++ new/kmime-18.12.2/autotests/attachmenttest.cpp 2019-01-11 07:16:43.000000000 +0100 @@ -167,7 +167,7 @@ att->contentType()->setName(QStringLiteral("attachment.jpg"), "utf-8"); mixed->addContent(att); - mixed->contentType("multipart/mixed"); + mixed->contentType()->setMimeType("multipart/mixed"); QVERIFY(KMime::hasAttachment(root)); QVERIFY(KMime::hasAttachment(mixed)); @@ -209,3 +209,93 @@ QCOMPARE(hasAttachment(root), false); delete root; } + +void AttachmentTest::testAttachment1() +{ + auto root = new KMime::Message; + root->setContent("From: Sender <[email protected]>\n" + "To: Receiver <[email protected]>\n" + "Subject: Test\n" + "Date: Thu, 19 Jul 2018 10:30:06 +0200\n" + "MIME-Version: 1.0\n" + "Content-Type: multipart/mixed; boundary=\"nextPart5103690.GVhdRC0Mqz\"\n" + "Content-Transfer-Encoding: 7Bit\n" + "\n" + "This is a multi-part message in MIME format.\n" + "\n" + "--nextPart5103690.GVhdRC0Mqz\n" + "Content-Transfer-Encoding: 7Bit\n" + "Content-Type: text/plain; charset=\"us-ascii\"\n" + "\n" + "Foo\n" + "\n" + "--nextPart5103690.GVhdRC0Mqz\n" + "Content-Disposition: attachment; filename=\"Screenshot_20180719_102529.png\"\n" + "Content-Transfer-Encoding: base64\n" + "Content-Type: image/png; name=\"Screenshot_20180719_102529.png\"\n" + "\n" + "ddd\n" + "\n" + "--nextPart5103690.GVhdRC0Mqz\n" + "Content-Disposition: attachment; filename=\"Screenshot_20180719_102550.png\"\n" + "Content-Transfer-Encoding: base64\n" + "Content-Type: image/png; name=\"Screenshot_20180719_102550.png\"\n" + "\n" + "zzzz\n" + "\n" + "--nextPart5103690.GVhdRC0Mqz--\n"); + + root->parse(); + QCOMPARE(hasAttachment(root), true); + delete root; +} + +void AttachmentTest::testAttachment2() +{ + auto root = new KMime::Message; + root->setContent("From: Sender <[email protected]>\n" + "Content-Type: multipart/alternative; boundary=\"Apple-Mail=_627B41D2-E6ED-4B17-8F96-6CD63EC055AE\"\n" + "MIME-Version: 1.0\n" + "Subject: Test\n" + "Date: Tue, 11 Dec 2018 10:44:41 +0000\n" + "To: Receiver <[email protected]>\n" + "\n" + "\n" + "\n" + "--Apple-Mail=_627B41D2-E6ED-4B17-8F96-6CD63EC055AE\n" + "Content-Transfer-Encoding: quoted-printable\n" + "Content-Type: text/plain; charset=\"us-ascii\"\n" + "\n" + "Text blabla\n" + "\n" + "--Apple-Mail=_627B41D2-E6ED-4B17-8F96-6CD63EC055AE\n" + "Content-Type: multipart/mixed; boundary=\"Apple-Mail=_5FDAE280-1EA6-4604-9F81-BBB9B9137CE1\"\n" + "\n" + "\n" + "--Apple-Mail=_5FDAE280-1EA6-4604-9F81-BBB9B9137CE1\n" + "Content-Transfer-Encoding: 7bit\n" + "Content-Type: text/html; charset=\"us-ascii\"\n" + "\n" + "<html><head><body>foo</body></html>\n" + "--Apple-Mail=_5FDAE280-1EA6-4604-9F81-BBB9B9137CE1\n" + "Content-Disposition: inline; filename=\"bla.pdf\"\n" + "Content-Type: application/pdf; name=\"bla.pdf\"; x-unix-mode=\"0644\"\n" + "Content-Transfer-Encoding: base64\n" + "\n" + "bla\n" + "\n" + "--Apple-Mail=_5FDAE280-1EA6-4604-9F81-BBB9B9137CE1\n" + "Content-Transfer-Encoding: quoted-printable\n" + "Content-Type: text/html; charset=\"us-ascii\"\n" + "\n" + "<html><body>foo html</body></html>=\n" + "\n" + "--Apple-Mail=_5FDAE280-1EA6-4604-9F81-BBB9B9137CE1--\n" + "\n" + "--Apple-Mail=_627B41D2-E6ED-4B17-8F96-6CD63EC055AE--\n"); + + root->parse(); + //Fix show has attachment + QCOMPARE(hasAttachment(root), true); + delete root; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-18.12.1/autotests/attachmenttest.h new/kmime-18.12.2/autotests/attachmenttest.h --- old/kmime-18.12.1/autotests/attachmenttest.h 2018-12-14 07:00:55.000000000 +0100 +++ new/kmime-18.12.2/autotests/attachmenttest.h 2019-01-11 07:16:43.000000000 +0100 @@ -31,6 +31,8 @@ void testHasAttachment(); void testNestedMultipart(); void testEncrypted(); + void testAttachment1(); + void testAttachment2(); }; #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-18.12.1/po/zh_CN/libkmime5.po new/kmime-18.12.2/po/zh_CN/libkmime5.po --- old/kmime-18.12.1/po/zh_CN/libkmime5.po 2019-01-08 01:18:17.000000000 +0100 +++ new/kmime-18.12.2/po/zh_CN/libkmime5.po 2019-02-05 01:45:46.000000000 +0100 @@ -7,7 +7,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2018-11-12 06:58+0100\n" -"PO-Revision-Date: 2019-01-05 20:50\n" +"PO-Revision-Date: 2019-01-27 23:05\n" "Last-Translator: guoyunhe <[email protected]>\n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-18.12.1/src/kmime_util.cpp new/kmime-18.12.2/src/kmime_util.cpp --- old/kmime-18.12.1/src/kmime_util.cpp 2018-12-14 07:00:55.000000000 +0100 +++ new/kmime-18.12.2/src/kmime_util.cpp 2019-01-11 07:16:43.000000000 +0100 @@ -613,7 +613,7 @@ // Ok, content itself is not an attachment. now we deal with multiparts auto ct = content->contentType(false); - if (ct && ct->isMultipart() && !ct->isSubtype("related") && !ct->isSubtype("alternative")) { + if (ct && ct->isMultipart() && !ct->isSubtype("related")) {// && !ct->isSubtype("alternative")) { Q_FOREACH (Content *child, content->contents()) { if (hasAttachment(child)) { return true;
