Hello community, here is the log from the commit of package kmime for openSUSE:Factory checked in at 2016-05-31 12:15:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kmime (Old) and /work/SRC/openSUSE:Factory/.kmime.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kmime" Changes: -------- --- /work/SRC/openSUSE:Factory/kmime/kmime.changes 2016-03-26 15:16:20.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kmime.new/kmime.changes 2016-05-31 12:15:53.000000000 +0200 @@ -1,0 +2,24 @@ +Sat May 7 10:32:46 UTC 2016 - [email protected] + +- Update to KDE Applications 16.04.1 + * KDE Applications 16.04.1 + * https://www.kde.org/announcements/announce-applications-16.04.1.php + + +------------------------------------------------------------------- +Sun Apr 17 06:08:13 UTC 2016 - [email protected] + +- Update to KDE Applications 16.04.0 + * KDE Applications 16.04.0 + * https://www.kde.org/announcements/announce-applications-16.04.0.php + + +------------------------------------------------------------------- +Mon Apr 11 06:44:29 UTC 2016 - [email protected] + +- Update to KDE Applications 16.03.90 + * KDE Applications 16.04.0 RC + * https://www.kde.org/announcements/announce-applications-16.04-rc.php + + +------------------------------------------------------------------- Old: ---- kmime-15.12.3.tar.xz New: ---- kmime-16.04.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kmime.spec ++++++ --- /var/tmp/diff_new_pack.S9q4iE/_old 2016-05-31 12:15:54.000000000 +0200 +++ /var/tmp/diff_new_pack.S9q4iE/_new 2016-05-31 12:15:54.000000000 +0200 @@ -17,7 +17,7 @@ Name: kmime -Version: 15.12.3 +Version: 16.04.1 Release: 0 %define kf5_version 5.1.0 Summary: KDE PIM Libraries: Mime support @@ -47,7 +47,7 @@ BuildRequires: kwallet-devel >= %{kf5_version} BuildRequires: kwidgetsaddons-devel >= %{kf5_version} BuildRequires: kxmlgui-devel >= %{kf5_version} -BuildRequires: libKF5AkonadiPrivate-devel >= 1.72.43 +BuildRequires: akonadi-server-devel BuildRequires: libassuan-devel BuildRequires: libical-devel >= 0.42 BuildRequires: libxslt-devel ++++++ kmime-15.12.3.tar.xz -> kmime-16.04.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-15.12.3/CMakeLists.txt new/kmime-16.04.1/CMakeLists.txt --- old/kmime-15.12.3/CMakeLists.txt 2015-11-13 19:31:32.000000000 +0100 +++ new/kmime-16.04.1/CMakeLists.txt 2016-04-26 22:19:30.000000000 +0200 @@ -3,7 +3,7 @@ project(KMime) # ECM setup -find_package(ECM 5.12.0 CONFIG REQUIRED) +find_package(ECM 5.19.0 CONFIG REQUIRED) set(CMAKE_MODULE_PATH ${KMime_SOURCE_DIR}/cmake ${ECM_MODULE_PATH}) include(GenerateExportHeader) @@ -14,11 +14,11 @@ include(FeatureSummary) include(KDEInstallDirs) include(KDECMakeSettings) -include(KDEFrameworkCompilerSettings) +include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) -set(KF5_VERSION "5.12.0") -set(KMIME_LIB_VERSION "4.87.0") +set(KF5_VERSION "5.19.0") +set(KMIME_LIB_VERSION "5.2.1") set(QT_REQUIRED_VERSION "5.2.0") ecm_setup_version(${KMIME_LIB_VERSION} VARIABLE_PREFIX KMIME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-15.12.3/autotests/CMakeLists.txt new/kmime-16.04.1/autotests/CMakeLists.txt --- old/kmime-15.12.3/autotests/CMakeLists.txt 2015-11-13 19:31:32.000000000 +0100 +++ new/kmime-16.04.1/autotests/CMakeLists.txt 2016-04-26 22:19:30.000000000 +0200 @@ -17,6 +17,7 @@ ) set_target_properties(${_testName} PROPERTIES COMPILE_FLAGS -DTEST_DATA_DIR="\\"${CMAKE_CURRENT_SOURCE_DIR}/data\\"" ) ecm_mark_as_test(${_testName}) + set_tests_properties(kmime-${_testName} PROPERTIES ENVIRONMENT LC_TIME=C) endforeach() endmacro() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-15.12.3/autotests/contentindextest.cpp new/kmime-16.04.1/autotests/contentindextest.cpp --- old/kmime-15.12.3/autotests/contentindextest.cpp 2015-11-13 19:31:32.000000000 +0100 +++ new/kmime-16.04.1/autotests/contentindextest.cpp 2016-04-26 22:19:30.000000000 +0200 @@ -43,15 +43,15 @@ ContentIndex ci1; QVERIFY(!ci1.isValid()); - ContentIndex ci2(QLatin1String("1.2.bla")); + ContentIndex ci2(QStringLiteral("1.2.bla")); QVERIFY(!ci2.isValid()); - ContentIndex ci3(QLatin1String("1")); + ContentIndex ci3(QStringLiteral("1")); QVERIFY(ci3.isValid()); QCOMPARE(ci3.pop(), 1u); QVERIFY(!ci3.isValid()); - ContentIndex ci4(QLatin1String("3.2")); + ContentIndex ci4(QStringLiteral("3.2")); QVERIFY(ci4.isValid()); QCOMPARE(ci4.pop(), 3u); QCOMPARE(ci4.pop(), 2u); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-15.12.3/autotests/contenttest.cpp new/kmime-16.04.1/autotests/contenttest.cpp --- old/kmime-15.12.3/autotests/contenttest.cpp 2015-11-13 19:31:32.000000000 +0100 +++ new/kmime-16.04.1/autotests/contenttest.cpp 2016-04-26 22:19:30.000000000 +0200 @@ -302,7 +302,7 @@ "body\n"; msg->setContent(data); QByteArray content = msg->encodedContent(true /* use CRLF */); - QStringList lines = QString::fromLatin1(content).split(QLatin1String("\r\n")); + QStringList lines = QString::fromLatin1(content).split(QStringLiteral("\r\n")); foreach (const QString &line, lines) { QEXPECT_FAIL("", "KMime does not fold lines longer than 998 characters", Continue); QVERIFY(line.length() < 998 && !line.isEmpty() && line != QLatin1String("body")); @@ -501,7 +501,7 @@ "\n" "\n"; - const QString imageName = QLatin1String("Name of the encoded file (oxygen 22x22 kde.png)"); + const QString imageName = QStringLiteral("Name of the encoded file (oxygen 22x22 kde.png)"); const QByteArray imageBase64 = "\n" "iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-15.12.3/autotests/dateformattertest.cpp new/kmime-16.04.1/autotests/dateformattertest.cpp --- old/kmime-15.12.3/autotests/dateformattertest.cpp 2015-11-13 19:31:32.000000000 +0100 +++ new/kmime-16.04.1/autotests/dateformattertest.cpp 2016-04-26 22:19:30.000000000 +0200 @@ -37,10 +37,10 @@ auto dt = QDateTime::currentDateTime(); dt.setTime(QTime(12, 34, 56)); - QCOMPARE(f.dateString(dt), QString::fromLatin1("Today 12:34 PM")); + QCOMPARE(f.dateString(dt), QString::fromLatin1("Today 12:34:56")); dt.setDate(dt.date().addDays(-1)); - QCOMPARE(f.dateString(dt), QString::fromLatin1("Yesterday 12:34 PM")); + QCOMPARE(f.dateString(dt), QString::fromLatin1("Yesterday 12:34:56")); dt.setDate(dt.date().addDays(-1)); QVERIFY(f.dateString(dt).startsWith(QLocale::c().toString(dt, QLatin1String("dddd")))); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-15.12.3/autotests/messagetest.cpp new/kmime-16.04.1/autotests/messagetest.cpp --- old/kmime-15.12.3/autotests/messagetest.cpp 2015-11-13 19:31:32.000000000 +0100 +++ new/kmime-16.04.1/autotests/messagetest.cpp 2016-04-26 22:19:30.000000000 +0200 @@ -149,7 +149,7 @@ void MessageTest::testDavidsParseCrash() { - KMime::Message::Ptr mail = readAndParseMail(QLatin1String("dfaure-crash.mbox")); + KMime::Message::Ptr mail = readAndParseMail(QStringLiteral("dfaure-crash.mbox")); QCOMPARE(mail->to()->asUnicodeString().toLatin1().data(), "[email protected]"); } @@ -157,7 +157,7 @@ { // Headers without a space, like the CC header here, are allowed according to // the examples in RFC2822, Appendix A5 - QString mail = QLatin1String("From:\n" + QString mail = QStringLiteral("From:\n" "To: [email protected]\n" "Cc:[email protected]\n" "Subject: Test\n" @@ -178,7 +178,7 @@ { // The first subject line here doesn't contain anything. This is invalid, // however there are some mailers out there that produce those messages. - QString mail = QLatin1String("Subject:\n" + QString mail = QStringLiteral("Subject:\n" " Hello\n" " World\n" "To: \n" @@ -197,7 +197,7 @@ { // Test that the message body is OK even though some headers are missing KMime::Message msg; - QString body = QLatin1String("Hi Donald, look at those nice pictures I found!\n"); + QString body = QStringLiteral("Hi Donald, look at those nice pictures I found!\n"); QString content = QLatin1String("From: [email protected]\n" "To: [email protected]\n" "Subject: Cute Kittens\n" @@ -225,7 +225,7 @@ { // Test that the message body is OK even though some headers are missing KMime::Message msg; - const QString content = QLatin1String( + const QString content = QStringLiteral( "Content-Type: MULTIPART/MIXED;\n" " BOUNDARY=\"0-1804289383-1260384639=:52580\"\n" "\n" @@ -278,7 +278,7 @@ // Test adjusted for taking into account that KMIME now removes bidi control chars // instead of adding PDF chars, because of broken KHTML. //const QString expectedDisplayName = "\"Sender" + RLO + PDF + "\""; - const QString expectedDisplayName = QLatin1String("Sender"); + const QString expectedDisplayName = QStringLiteral("Sender"); const QString expectedMailbox = expectedDisplayName + QLatin1String(" <[email protected]>"); QCOMPARE(msg.from()->addresses().count(), 1); QCOMPARE(msg.from()->asUnicodeString(), expectedMailbox); @@ -314,7 +314,7 @@ KMime::Headers::To *to = new KMime::Headers::To; KMime::Types::Mailbox address; address.setAddress("[email protected]"); - address.setName(QLatin1String("Fränz Töster")); + address.setName(QStringLiteral("Fränz Töster")); to->addAddress(address); to->setRFC2047Charset("ISO-8859-1"); // default changed to UTF-8 in KF5, which is fine, but breaks the test msg.appendHeader(to); @@ -326,7 +326,7 @@ "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=\"utf-16\"\n" "Content-Transfer-Encoding: base64\n" - "To: =?ISO-8859-1?Q?Fr=C3=A4nz_T=C3=B6ster?= <[email protected]>\n" + "To: =?ISO-8859-1?Q?Fr=E4nz_T=F6ster?= <[email protected]>\n" "\n" "//5UAGgAaQBzACAAaQBzACAAVQBUAEYALQAxADYAIABUAGUAeAB0AC4ACgAKAAo=\n" "\n"; @@ -430,7 +430,7 @@ void MessageTest::testIssue3908() { - KMime::Message::Ptr msg = readAndParseMail(QLatin1String("issue3908.mbox")); + KMime::Message::Ptr msg = readAndParseMail(QStringLiteral("issue3908.mbox")); QCOMPARE(msg->contents().size(), 2); KMime::Content *attachment = msg->contents().at(1); QVERIFY(attachment); @@ -449,7 +449,7 @@ { // This loads a mail which has a content-disposition of which the filename parameter is empty. // Check that the parser doesn't choke on this. - KMime::Message::Ptr msg = readAndParseMail(QLatin1String("broken-content-disposition.mbox")); + KMime::Message::Ptr msg = readAndParseMail(QStringLiteral("broken-content-disposition.mbox")); QCOMPARE(msg->subject()->as7BitString().data(), "Subject: Fwd: test broken mail"); QCOMPARE(msg->contents().size(), 2); @@ -462,7 +462,7 @@ void MessageTest::testBug223509() { - KMime::Message::Ptr msg = readAndParseMail(QLatin1String("encoding-crash.mbox")); + KMime::Message::Ptr msg = readAndParseMail(QStringLiteral("encoding-crash.mbox")); QCOMPARE(msg->subject()->as7BitString().data(), "Subject: Blub"); QCOMPARE(msg->contents().size(), 0); @@ -491,7 +491,7 @@ // // First, test some basic properties to check that the parsing was correct // - KMime::Message::Ptr msg = readAndParseMail(QLatin1String("simple-encapsulated.mbox")); + KMime::Message::Ptr msg = readAndParseMail(QStringLiteral("simple-encapsulated.mbox")); QCOMPARE(msg->contentType()->mimeType().data(), "multipart/mixed"); QCOMPARE(msg->contents().size(), 2); QVERIFY(msg->isTopLevel()); @@ -537,8 +537,8 @@ encapsulated->storageSize()); // Now change some properties on the encapsulated message - encapsulated->subject()->fromUnicodeString(QLatin1String("New subject"), "us-ascii"); - encapsulated->fromUnicodeString(QLatin1String("New body string.")); + encapsulated->subject()->fromUnicodeString(QStringLiteral("New subject"), "us-ascii"); + encapsulated->fromUnicodeString(QStringLiteral("New body string.")); // Since we didn't assemble the encapsulated message yet, it should still have the old headers QVERIFY(encapsulated->encodedContent().contains("Foo")); @@ -572,7 +572,7 @@ { KMime::setUseOutlookAttachmentEncoding(true); // Try and decode - KMime::Message::Ptr msg = readAndParseMail(QLatin1String("outlook-attachment.mbox")); + KMime::Message::Ptr msg = readAndParseMail(QStringLiteral("outlook-attachment.mbox")); QVERIFY(msg->attachments().count() == 1); KMime::Content *attachment = msg->contents()[1]; @@ -586,7 +586,7 @@ // Try and encode attachment->clear();// = new Content(); attachment->contentDisposition()->setDisposition(Headers::CDattachment); - attachment->contentDisposition()->setFilename(QString::fromUtf8("å.diff")); + attachment->contentDisposition()->setFilename(QStringLiteral("å.diff")); attachment->contentDisposition()->setRFC2047Charset("ISO-8859-1"); // default changed to UTF-8 in KF5, which is fine, but breaks the test attachment->assemble(); qDebug() << "got:" << attachment->contentDisposition()->as7BitString(false); @@ -596,7 +596,7 @@ void MessageTest::testEncryptedMails() { - KMime::Message::Ptr msg = readAndParseMail(QLatin1String("x-pkcs7.mbox")); + KMime::Message::Ptr msg = readAndParseMail(QStringLiteral("x-pkcs7.mbox")); QVERIFY(msg->contents().size() == 0); QVERIFY(msg->attachments().count() == 0); QVERIFY(KMime::isEncrypted(msg.data()) == true); @@ -606,7 +606,7 @@ void MessageTest::testReturnSameMail() { - KMime::Message::Ptr msg = readAndParseMail(QLatin1String("dontchangemail.mbox")); + KMime::Message::Ptr msg = readAndParseMail(QStringLiteral("dontchangemail.mbox")); QFile file(QLatin1String(TEST_DATA_DIR) + QLatin1String("/mails/dontchangemail.mbox")); const bool ok = file.open(QIODevice::ReadOnly); if (!ok) { @@ -624,7 +624,7 @@ void MessageTest::testEmptySubject() { - auto msg = readAndParseMail(QLatin1String("empty-subject.mbox")); + auto msg = readAndParseMail(QStringLiteral("empty-subject.mbox")); QVERIFY(msg); // was crashing for Andre QVERIFY(msg->hasHeader("Subject")); QVERIFY(msg->subject()->asUnicodeString().isEmpty()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-15.12.3/autotests/rfc2047test.cpp new/kmime-16.04.1/autotests/rfc2047test.cpp --- old/kmime-15.12.3/autotests/rfc2047test.cpp 2015-11-13 19:31:32.000000000 +0100 +++ new/kmime-16.04.1/autotests/rfc2047test.cpp 2016-04-26 22:19:30.000000000 +0200 @@ -39,7 +39,7 @@ "=?utf-8?q?Ingo=20Kl=C3=B6cker?= <[email protected]>"); // Fallback to UTF-8 for encoding since the given charset can't encode the string - const QString input = QString::fromUtf8("æſðđŋħł"); + const QString input = QStringLiteral("æſðđŋħł"); const QByteArray result = KMime::encodeRFC2047String(input, "latin1"); QCOMPARE(KCodecs::decodeRFC2047String(QString::fromUtf8(result)), input); QVERIFY(result.contains("utf-8")); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-15.12.3/cmake/CheckTimezone.cmake new/kmime-16.04.1/cmake/CheckTimezone.cmake --- old/kmime-15.12.3/cmake/CheckTimezone.cmake 2015-11-13 19:31:32.000000000 +0100 +++ new/kmime-16.04.1/cmake/CheckTimezone.cmake 1970-01-01 01:00:00.000000000 +0100 @@ -1,34 +0,0 @@ -# Discover the type of the timezone variable, -# set HAVE_TIMEZONE if found for config.h - -include (CheckCXXSourceCompiles) - -check_cxx_source_compiles(" -#include <stdlib.h> -#include <ctype.h> -#include <time.h> -#include <unistd.h> -int main() { timezone = 1; return 0;} -" - HAVE_TIMEZONE) - -if (NOT HAVE_TIMEZONE) - # Then it's probably this variant, just to be sure - check_cxx_source_compiles(" -#include <stdlib.h> -#include <ctype.h> -#include <time.h> -#include <unistd.h> -int main() { const char *p = timezone(0,0); return 0;} -" - HAVE_BSD_TIMEZONE) -endif() - -check_cxx_source_compiles(" -#include <stdlib.h> -#include <ctype.h> -#include <time.h> -#include <unistd.h> -int main() { struct tm tm; tm.tm_gmtoff=1; return 0; } -" - HAVE_TM_GMTOFF) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-15.12.3/cmake/ConfigureChecks.cmake new/kmime-16.04.1/cmake/ConfigureChecks.cmake --- old/kmime-15.12.3/cmake/ConfigureChecks.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/kmime-16.04.1/cmake/ConfigureChecks.cmake 2016-04-26 22:19:30.000000000 +0200 @@ -0,0 +1,40 @@ +# Discover the type of the timezone variable, +# set HAVE_TIMEZONE if found for config.h + +include (CheckCXXSourceCompiles) + +check_cxx_source_compiles(" +#include <stdlib.h> +#include <ctype.h> +#include <time.h> +#include <unistd.h> +int main() { timezone = 1; return 0;} +" + HAVE_TIMEZONE) + +if (NOT HAVE_TIMEZONE) + # Then it's probably this variant, just to be sure + check_cxx_source_compiles(" +#include <stdlib.h> +#include <ctype.h> +#include <time.h> +#include <unistd.h> +int main() { const char *p = timezone(0,0); return 0;} +" + HAVE_BSD_TIMEZONE) +endif() + +check_cxx_source_compiles(" +#include <stdlib.h> +#include <ctype.h> +#include <time.h> +#include <unistd.h> +int main() { struct tm tm; tm.tm_gmtoff=1; return 0; } +" + HAVE_TM_GMTOFF) + +check_cxx_source_compiles(" +#include <string.h> +int main() { strcasestr(\"\", \"\"); } +" + HAVE_STRCASESTR) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-15.12.3/src/CMakeLists.txt new/kmime-16.04.1/src/CMakeLists.txt --- old/kmime-15.12.3/src/CMakeLists.txt 2015-11-13 19:31:32.000000000 +0100 +++ new/kmime-16.04.1/src/CMakeLists.txt 2016-04-26 22:19:30.000000000 +0200 @@ -1,4 +1,4 @@ -include(CheckTimezone) +include(ConfigureChecks) configure_file(config-kmime.h.cmake ${KMime_BINARY_DIR}/src/config-kmime.h) @@ -33,12 +33,17 @@ target_include_directories(KF5Mime INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KMime>") target_include_directories(KF5Mime PUBLIC "$<BUILD_INTERFACE:${KMime_SOURCE_DIR}/src;${KMime_BINARY_DIR}/src;${KMime_BINARY_DIR}>") +if (WIN32) + set(_kmime_extra_libs ws2_32) +endif() + target_link_libraries(KF5Mime PUBLIC Qt5::Core PRIVATE KF5::I18n KF5::Codecs + ${_kmime_extra_libs} ) set_target_properties(KF5Mime PROPERTIES diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-15.12.3/src/config-kmime.h.cmake new/kmime-16.04.1/src/config-kmime.h.cmake --- old/kmime-15.12.3/src/config-kmime.h.cmake 2015-11-13 19:31:32.000000000 +0100 +++ new/kmime-16.04.1/src/config-kmime.h.cmake 2016-04-26 22:19:30.000000000 +0200 @@ -3,3 +3,6 @@ /* Define if you have a tm_gmtoff member in struct tm */ #cmakedefine HAVE_TM_GMTOFF 1 + +/* Define if you have strcasestr in string.h */ +#cmakedefine HAVE_STRCASESTR 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-15.12.3/src/kmime_dateformatter.cpp new/kmime-16.04.1/src/kmime_dateformatter.cpp --- old/kmime-15.12.3/src/kmime_dateformatter.cpp 2015-11-13 19:31:32.000000000 +0100 +++ new/kmime-16.04.1/src/kmime_dateformatter.cpp 2016-04-26 22:19:30.000000000 +0200 @@ -35,7 +35,7 @@ #include <config-kmime.h> -#include <stdlib.h> // for abs() +#include <cmath> // for abs() #include <QtCore/QTextStream> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-15.12.3/src/kmime_mdn.cpp new/kmime-16.04.1/src/kmime_mdn.cpp --- old/kmime-15.12.3/src/kmime_mdn.cpp 2015-11-13 19:31:32.000000000 +0100 +++ new/kmime-16.04.1/src/kmime_mdn.cpp 2016-04-26 22:19:30.000000000 +0200 @@ -41,7 +41,11 @@ #include <QtCore/QByteArray> -#include <unistd.h> // gethostname +#ifdef Q_OS_WIN // gethostname +# include <winsock2.h> +#else +# include <unistd.h> +#endif namespace KMime { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-15.12.3/src/kmime_util.cpp new/kmime-16.04.1/src/kmime_util.cpp --- old/kmime-15.12.3/src/kmime_util.cpp 2015-11-13 19:31:32.000000000 +0100 +++ new/kmime-16.04.1/src/kmime_util.cpp 2016-04-26 22:19:30.000000000 +0200 @@ -285,6 +285,21 @@ return end; } +#ifndef HAVE_STRCASESTR +static const char *strcasestr(const char *haystack, const char *needle) +{ + /* Copied from libreplace as part of qtwebengine 5.5.1 */ + const char *s; + size_t nlen = strlen(needle); + for (s = haystack; *s; s++) { + if (toupper(*needle) == toupper(*s) && strncasecmp(s, needle, nlen) == 0) { + return (char *)((uintptr_t)s); + } + } + return NULL; +} +#endif + int indexOfHeader(const QByteArray &src, const QByteArray &name, int &end, int &dataBegin, bool *folded) { QByteArray n = name; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-15.12.3/tests/test_dates.cpp new/kmime-16.04.1/tests/test_dates.cpp --- old/kmime-15.12.3/tests/test_dates.cpp 2015-11-13 19:31:32.000000000 +0100 +++ new/kmime-16.04.1/tests/test_dates.cpp 2016-04-26 22:19:30.000000000 +0200 @@ -27,10 +27,10 @@ if (HeaderParsing::parseDateTime(str, str + rfcd.length(), dt)) { qDebug() << " ntime =" << (ntime) << " dt =" << (dt.toTime_t()); qdt.setTime_t(dt.toTime_t()); - qDebug() << " qq =" << qdt.toString(QLatin1String("ddd, dd MMM yyyy hh:mm:ss")); + qDebug() << " qq =" << qdt.toString(QStringLiteral("ddd, dd MMM yyyy hh:mm:ss")); qDebug() << " rfc2822 :" << t.formatDate(DateFormatter::Rfc, dt.toTime_t()); } - QString ddd = QLatin1String("Mon, 05 Aug 2002 01:57:51 -0700"); + QString ddd = QStringLiteral("Mon, 05 Aug 2002 01:57:51 -0700"); ba = ddd.toLatin1(); str = ba.constData(); if (HeaderParsing::parseDateTime(str, str + ddd.length(), dt)) { @@ -38,7 +38,7 @@ qDebug() << " rfc2822 :" << t.formatDate(DateFormatter::Rfc, dt.toTime_t()); } - t.setCustomFormat(QLatin1String("MMMM dddd yyyy Z")); + t.setCustomFormat(QStringLiteral("MMMM dddd yyyy Z")); qDebug() << "tCustom : \t" << t.dateString(ntime); ntime -= (24 * 3600 + 1); @@ -53,7 +53,7 @@ qDebug() << "tIso : \t" << t.dateString(ntime); t.setFormat(DateFormatter::Rfc); qDebug() << "trfc2822 : \t" << t.dateString(ntime); - t.setCustomFormat(QLatin1String("MMMM dddd Z yyyy")); + t.setCustomFormat(QStringLiteral("MMMM dddd Z yyyy")); qDebug() << "tCustom : \t" << t.dateString(ntime); t.setFormat(DateFormatter::Fancy); @@ -68,7 +68,7 @@ qDebug() << "tIso : \t" << t.dateString(ntime); t.setFormat(DateFormatter::Rfc); qDebug() << "trfc2822 : \t" << t.dateString(ntime); - t.setCustomFormat(QLatin1String("MMMM Z dddd yyyy")); + t.setCustomFormat(QStringLiteral("MMMM Z dddd yyyy")); qDebug() << "tCustom : \t" << t.dateString(ntime); qDebug() << "Static functions (dates like in the last test):"; @@ -78,7 +78,7 @@ qDebug() << "tIso : \t" << DateFormatter::formatDate(DateFormatter::Iso, ntime); qDebug() << "trfc2822 : \t" << DateFormatter::formatDate(DateFormatter::Rfc, ntime); qDebug() << "tCustom : \t" << DateFormatter::formatDate(DateFormatter::Custom, ntime, - QLatin1String("Z MMMM dddd yyyy")); + QStringLiteral("Z MMMM dddd yyyy")); t.setFormat(DateFormatter::Fancy); qDebug() << "QDateTime taking: (dates as in first test)"; qDebug() << "tFancy : \t" << t.dateString((QDateTime::currentDateTime())); @@ -90,6 +90,6 @@ qDebug() << "tIso : \t" << t.dateString(QDateTime::currentDateTime()); t.setFormat(DateFormatter::Rfc); qDebug() << "tIso : \t" << t.dateString(QDateTime::currentDateTime()); - t.setCustomFormat(QLatin1String("MMMM d dddd yyyy Z")); + t.setCustomFormat(QStringLiteral("MMMM d dddd yyyy Z")); qDebug() << "tCustom : \t" << t.dateString(QDateTime::currentDateTime()); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-15.12.3/tests/test_kmime_header_parsing.cpp new/kmime-16.04.1/tests/test_kmime_header_parsing.cpp --- old/kmime-15.12.3/tests/test_kmime_header_parsing.cpp 2015-11-13 19:31:32.000000000 +0100 +++ new/kmime-16.04.1/tests/test_kmime_header_parsing.cpp 2016-04-26 22:19:30.000000000 +0200 @@ -161,14 +161,14 @@ break; case 1: { // atom - QString result = QLatin1String("with 8bit: "); + QString result = QStringLiteral("with 8bit: "); bool ok = parseAtom(iit, iend, result, true); cout << (ok ? "OK" : "BAD") << endl << "result:\n" << result << endl; - result = QLatin1String("without 8bit: "); + result = QStringLiteral("without 8bit: "); #ifdef COMPILE_FAIL ok = parseAtom(indata.begin(), iend, result, false); #else @@ -183,14 +183,14 @@ break; case 2: { // token - QString result = QLatin1String("with 8bit: "); + QString result = QStringLiteral("with 8bit: "); bool ok = parseToken(iit, iend, result, true); cout << (ok ? "OK" : "BAD") << endl << "result:\n" << result << endl; - result = QLatin1String("without 8bit: "); + result = QStringLiteral("without 8bit: "); #ifdef COMPILE_FAIL ok = parseToken(indata.begin(), iend, result, false); #else
