diff -Nru kcodecs-5.55.0/autotests/base64benchmark.cpp kcodecs-5.56.0/autotests/base64benchmark.cpp --- kcodecs-5.55.0/autotests/base64benchmark.cpp 2019-02-02 23:54:09.000000000 +0000 +++ kcodecs-5.56.0/autotests/base64benchmark.cpp 2019-03-02 13:35:26.000000000 +0000 @@ -99,7 +99,7 @@ KCodecs::Decoder *decoder = codec->makeDecoder(); QByteArray::const_iterator inputIt = input.constBegin(); QByteArray::iterator resultIt = result.begin(); - decoder->decode(inputIt, input.constEnd(), resultIt, result.end()); + decoder->decode(inputIt, input.constEnd(), resultIt, result.constEnd()); result.truncate(resultIt - result.begin()); delete decoder; } diff -Nru kcodecs-5.55.0/autotests/codectest.cpp kcodecs-5.56.0/autotests/codectest.cpp --- kcodecs-5.55.0/autotests/codectest.cpp 2019-02-02 23:54:09.000000000 +0000 +++ kcodecs-5.56.0/autotests/codectest.cpp 2019-03-02 13:35:26.000000000 +0000 @@ -40,12 +40,13 @@ QTest::addColumn("mode"); QDir codecBaseDir(QFINDTESTDATA("data")); - foreach (const QString &dir, codecBaseDir.entryList(QStringList(), QDir::Dirs | QDir::NoDotAndDotDot, - QDir::NoSort)) { + const QStringList lst = codecBaseDir.entryList(QStringList(), QDir::Dirs | QDir::NoDotAndDotDot, QDir::NoSort); + for (const QString &dir : lst) { if (dir.toLower().startsWith(QLatin1String("codec_"))) { const QString codecName = dir.right(dir.size() - 6); QDir codecDir(codecBaseDir.path() + QLatin1String("/") + dir); - foreach (const QString &file, codecDir.entryList(QStringList(), QDir::Files, QDir::NoSort)) { + const QStringList lst2 = codecDir.entryList(QStringList(), QDir::Files, QDir::NoSort); + for (const QString &file : lst2) { if (file.toLower().endsWith(QLatin1String(".expected"))) { const QString dataFileNameBase = file.left(file.size() - 9); QFile dataFile(codecDir.path() + QLatin1Char('/') + dataFileNameBase); diff -Nru kcodecs-5.55.0/autotests/kcharsetstest.cpp kcodecs-5.56.0/autotests/kcharsetstest.cpp --- kcodecs-5.55.0/autotests/kcharsetstest.cpp 2019-02-02 23:54:09.000000000 +0000 +++ kcodecs-5.56.0/autotests/kcharsetstest.cpp 2019-03-02 13:35:26.000000000 +0000 @@ -24,7 +24,7 @@ static bool encodingNameHasADescription(const QString &encodingName, const QStringList &descriptions) { - Q_FOREACH (QString description, descriptions) + for (const QString &description : descriptions) if (description.contains(encodingName)) { return true; } @@ -151,7 +151,7 @@ QCOMPARE(singleton->availableEncodingNames().count(), singleton->descriptiveEncodingNames().count()); - Q_FOREACH (QString encodingName, singleton->availableEncodingNames()) { + for (const QString &encodingName : singleton->availableEncodingNames()) { bool ok = false; if (encodingName == QLatin1String("ucs2") || encodingName == QLatin1String("ISO 10646-UCS-2")) { diff -Nru kcodecs-5.55.0/CMakeLists.txt kcodecs-5.56.0/CMakeLists.txt --- kcodecs-5.55.0/CMakeLists.txt 2019-02-02 23:54:09.000000000 +0000 +++ kcodecs-5.56.0/CMakeLists.txt 2019-03-02 13:35:26.000000000 +0000 @@ -1,10 +1,10 @@ cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.55.0") # handled by release scripts +set(KF5_VERSION "5.56.0") # handled by release scripts project(KCodecs VERSION ${KF5_VERSION}) include(FeatureSummary) -find_package(ECM 5.55.0 NO_MODULE) +find_package(ECM 5.56.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) @@ -41,7 +41,8 @@ if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") ecm_install_po_files_as_qm(po) endif() -#add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000) +add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00) +add_definitions(-DQT_NO_FOREACH) add_subdirectory(src) diff -Nru kcodecs-5.55.0/debian/changelog kcodecs-5.56.0/debian/changelog --- kcodecs-5.55.0/debian/changelog 2019-02-13 08:29:41.000000000 +0000 +++ kcodecs-5.56.0/debian/changelog 2019-03-09 16:34:37.000000000 +0000 @@ -1,3 +1,9 @@ +kcodecs (5.56.0-0ubuntu1) disco; urgency=medium + + * New upstream release (5.56.0) + + -- José Manuel Santamaría Lema Sat, 09 Mar 2019 16:34:37 +0000 + kcodecs (5.55.0-0ubuntu1) disco; urgency=medium * New upstream release (5.55.0) diff -Nru kcodecs-5.55.0/debian/control kcodecs-5.56.0/debian/control --- kcodecs-5.55.0/debian/control 2019-02-13 08:29:41.000000000 +0000 +++ kcodecs-5.56.0/debian/control 2019-03-09 16:34:37.000000000 +0000 @@ -6,7 +6,7 @@ Build-Depends: cmake (>= 3.0~), debhelper (>= 11~), doxygen, - extra-cmake-modules (>= 5.55.0~), + extra-cmake-modules (>= 5.56.0~), gperf, graphviz, libqt5sql5-sqlite:native, diff -Nru kcodecs-5.55.0/po/da/kcodecs5_qt.po kcodecs-5.56.0/po/da/kcodecs5_qt.po --- kcodecs-5.55.0/po/da/kcodecs5_qt.po 2019-02-02 23:54:09.000000000 +0000 +++ kcodecs-5.56.0/po/da/kcodecs5_qt.po 2019-03-02 13:35:26.000000000 +0000 @@ -2,8 +2,6 @@ # Copyright (C) YEAR This_file_is_part_of_KDE # This file is distributed under the same license as the PACKAGE package. # -# Martin Schlander, 2008. -# Martin Schlander , 2008. # Martin Schlander , 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015. # Keld Simonsen , 2010. msgid "" diff -Nru kcodecs-5.55.0/po/id/kcodecs5_qt.po kcodecs-5.56.0/po/id/kcodecs5_qt.po --- kcodecs-5.55.0/po/id/kcodecs5_qt.po 2019-02-02 23:54:09.000000000 +0000 +++ kcodecs-5.56.0/po/id/kcodecs5_qt.po 2019-03-02 13:35:26.000000000 +0000 @@ -16,7 +16,7 @@ "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Lokalize 2.0\n" "X-Qt-Contexts: true\n" diff -Nru kcodecs-5.55.0/po/zh_CN/kcodecs5_qt.po kcodecs-5.56.0/po/zh_CN/kcodecs5_qt.po --- kcodecs-5.55.0/po/zh_CN/kcodecs5_qt.po 2019-02-02 23:54:09.000000000 +0000 +++ kcodecs-5.56.0/po/zh_CN/kcodecs5_qt.po 2019-03-02 13:35:26.000000000 +0000 @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: kdeorg\n" -"PO-Revision-Date: 2019-01-27 22:57\n" +"PO-Revision-Date: 2019-02-20 23:16\n" "Last-Translator: guoyunhe \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -Nru kcodecs-5.55.0/src/kcodecs.cpp kcodecs-5.56.0/src/kcodecs.cpp --- kcodecs-5.55.0/src/kcodecs.cpp 2019-02-02 23:54:09.000000000 +0000 +++ kcodecs-5.56.0/src/kcodecs.cpp 2019-03-02 13:35:26.000000000 +0000 @@ -62,17 +62,12 @@ namespace KCodecs { -static const char hexChars[16] = { - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' -}; - static QList charsetCache; QByteArray cachedCharset(const QByteArray &name) { - foreach (const QByteArray &charset, charsetCache) { + for (const QByteArray &charset : qAsConst(charsetCache)) { if (qstricmp(name.data(), charset.data()) == 0) { return charset; } @@ -598,7 +593,10 @@ { // get an encoder: QScopedPointer enc(makeEncoder(newline)); - assert(!enc.isNull()); + if (enc.isNull()) { + qWarning() << "makeEncoder failed for" << name(); + return false; + } // encode and check for output buffer overflow: while (!enc->encode(scursor, send, dcursor, dend)) { diff -Nru kcodecs-5.55.0/src/kcodecs.h kcodecs-5.56.0/src/kcodecs.h --- kcodecs-5.55.0/src/kcodecs.h 2019-02-02 23:54:09.000000000 +0000 +++ kcodecs-5.56.0/src/kcodecs.h 2019-03-02 13:35:26.000000000 +0000 @@ -139,8 +139,10 @@ * * @param in data to be uuencoded * @return uuencoded string. + * @deprecated Always returns an empty bytearray. */ -KCODECS_EXPORT QByteArray uuencode(const QByteArray &in); +// TODO KF6 Remove? Or Make uuencode work? +KCODECS_DEPRECATED_EXPORT QByteArray uuencode(const QByteArray &in); /** * Encodes the given data using the uuencode algorithm. @@ -155,9 +157,10 @@ * output array will be lost. * * @param in data to be uuencoded. - * @param out uudecoded data. + * @param out an empty byte array */ -KCODECS_EXPORT void uuencode(const QByteArray &in, QByteArray &out); +// TODO KF6 Remove? Or Make uuencode work? +KCODECS_DEPRECATED_EXPORT void uuencode(const QByteArray &in, QByteArray &out); /** * Decodes the given data using the uudecode algorithm. diff -Nru kcodecs-5.55.0/src/kcodecsqp.cpp kcodecs-5.56.0/src/kcodecsqp.cpp --- kcodecs-5.55.0/src/kcodecsqp.cpp 2019-02-02 23:54:09.000000000 +0000 +++ kcodecs-5.56.0/src/kcodecsqp.cpp 2019-03-02 13:35:26.000000000 +0000 @@ -371,7 +371,8 @@ // "illegally formed soft linebreak or lonely CR!"; mInsideHexChar = false; mExpectLF = false; - assert(mAccu == 0); + if (mAccu != 0) + return false; } if (mInsideHexChar) { diff -Nru kcodecs-5.55.0/src/probers/nsBig5Prober.cpp kcodecs-5.56.0/src/probers/nsBig5Prober.cpp --- kcodecs-5.55.0/src/probers/nsBig5Prober.cpp 2019-02-02 23:54:09.000000000 +0000 +++ kcodecs-5.56.0/src/probers/nsBig5Prober.cpp 2019-03-02 13:35:26.000000000 +0000 @@ -35,6 +35,9 @@ nsProbingState nsBig5Prober::HandleData(const char *aBuf, unsigned int aLen) { + if (aLen == 0) + return mState; + nsSMState codingState; for (unsigned int i = 0; i < aLen; i++) { diff -Nru kcodecs-5.55.0/src/probers/nsEscSM.cpp kcodecs-5.56.0/src/probers/nsEscSM.cpp --- kcodecs-5.55.0/src/probers/nsEscSM.cpp 2019-02-02 23:54:09.000000000 +0000 +++ kcodecs-5.56.0/src/probers/nsEscSM.cpp 2019-03-02 13:35:26.000000000 +0000 @@ -183,7 +183,7 @@ PCK4BITS(eError, eError, eError, eError, eItsMe, eError, eStart, eStart) //40-47 }; -static const unsigned int ISO2022JPCharLenTable[] = {0, 0, 0, 0, 0, 0, 0, 0}; +static const unsigned int ISO2022JPCharLenTable[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; const SMModel ISO2022JPSMModel = { {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022JP_cls }, diff -Nru kcodecs-5.55.0/src/probers/nsEUCJPProber.cpp kcodecs-5.56.0/src/probers/nsEUCJPProber.cpp --- kcodecs-5.55.0/src/probers/nsEUCJPProber.cpp 2019-02-02 23:54:09.000000000 +0000 +++ kcodecs-5.56.0/src/probers/nsEUCJPProber.cpp 2019-03-02 13:35:26.000000000 +0000 @@ -41,6 +41,9 @@ nsProbingState nsEUCJPProber::HandleData(const char *aBuf, unsigned int aLen) { + if (aLen == 0) + return mState; + nsSMState codingState; for (unsigned int i = 0; i < aLen; i++) { diff -Nru kcodecs-5.55.0/src/probers/nsEUCKRProber.cpp kcodecs-5.56.0/src/probers/nsEUCKRProber.cpp --- kcodecs-5.55.0/src/probers/nsEUCKRProber.cpp 2019-02-02 23:54:09.000000000 +0000 +++ kcodecs-5.56.0/src/probers/nsEUCKRProber.cpp 2019-03-02 13:35:26.000000000 +0000 @@ -36,6 +36,9 @@ nsProbingState nsEUCKRProber::HandleData(const char *aBuf, unsigned int aLen) { + if (aLen == 0) + return mState; + nsSMState codingState; for (unsigned int i = 0; i < aLen; i++) { diff -Nru kcodecs-5.55.0/src/probers/nsGB2312Prober.cpp kcodecs-5.56.0/src/probers/nsGB2312Prober.cpp --- kcodecs-5.55.0/src/probers/nsGB2312Prober.cpp 2019-02-02 23:54:09.000000000 +0000 +++ kcodecs-5.56.0/src/probers/nsGB2312Prober.cpp 2019-03-02 13:35:26.000000000 +0000 @@ -41,6 +41,9 @@ nsProbingState nsGB18030Prober::HandleData(const char *aBuf, unsigned int aLen) { + if (aLen == 0) + return mState; + nsSMState codingState; for (unsigned int i = 0; i < aLen; i++) {