Hello community, here is the log from the commit of package kimap for openSUSE:Factory checked in at 2016-05-31 12:20:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kimap (Old) and /work/SRC/openSUSE:Factory/.kimap.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kimap" Changes: -------- --- /work/SRC/openSUSE:Factory/kimap/kimap.changes 2016-03-26 15:15:41.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kimap.new/kimap.changes 2016-05-31 12:20:12.000000000 +0200 @@ -1,0 +2,24 @@ +Sat May 7 10:29:36 UTC 2016 - tittiatc...@gmail.com + +- 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:05:40 UTC 2016 - tittiatc...@gmail.com + +- 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:42:11 UTC 2016 - tittiatc...@gmail.com + +- 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: ---- kimap-15.12.3.tar.xz New: ---- kimap-16.04.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kimap.spec ++++++ --- /var/tmp/diff_new_pack.YBuS3f/_old 2016-05-31 12:20:13.000000000 +0200 +++ /var/tmp/diff_new_pack.YBuS3f/_new 2016-05-31 12:20:13.000000000 +0200 @@ -17,7 +17,7 @@ Name: kimap -Version: 15.12.3 +Version: 16.04.1 Release: 0 %define kf5_version 5.1.0 Summary: KDE PIM Libraries: IMAP library @@ -48,7 +48,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 ++++++ kimap-15.12.3.tar.xz -> kimap-16.04.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimap-15.12.3/CMakeLists.txt new/kimap-16.04.1/CMakeLists.txt --- old/kimap-15.12.3/CMakeLists.txt 2015-11-14 11:20:56.000000000 +0100 +++ new/kimap-16.04.1/CMakeLists.txt 2016-04-26 22:18:39.000000000 +0200 @@ -3,7 +3,7 @@ project(KIMAP) # ECM setup -find_package(ECM 5.14.0 CONFIG REQUIRED) +find_package(ECM 5.19.0 CONFIG REQUIRED) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${KIMAP_SOURCE_DIR}/cmake) include(GenerateExportHeader) @@ -14,12 +14,12 @@ include(FeatureSummary) include(KDEInstallDirs) include(KDECMakeSettings) -include(KDEFrameworkCompilerSettings) +include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(ECMQtDeclareLoggingCategory) -set(KF5_VERSION "5.12.0") -set(KIMAP_LIB_VERSION "4.82.0") -set(KMIME_LIBS_VERSION "4.83.0") +set(KF5_VERSION "5.19.0") +set(KIMAP_LIB_VERSION "5.2.1") +set(KMIME_LIBS_VERSION "5.2.0") ecm_setup_version(${KIMAP_LIB_VERSION} VARIABLE_PREFIX KIMAP VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kimap_version.h" PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5IMAPConfigVersion.cmake" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimap-15.12.3/autotests/CMakeLists.txt new/kimap-16.04.1/autotests/CMakeLists.txt --- old/kimap-15.12.3/autotests/CMakeLists.txt 2015-11-14 11:20:56.000000000 +0100 +++ new/kimap-16.04.1/autotests/CMakeLists.txt 2016-04-26 22:18:39.000000000 +0200 @@ -43,4 +43,5 @@ streamparsertest setmetadatajobtest appendjobtest + statusjobtest ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimap-15.12.3/autotests/statusjobtest.cpp new/kimap-16.04.1/autotests/statusjobtest.cpp --- old/kimap-15.12.3/autotests/statusjobtest.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/kimap-16.04.1/autotests/statusjobtest.cpp 2016-04-26 22:18:39.000000000 +0200 @@ -0,0 +1,127 @@ +/* + Copyright (c) 2016 Daniel Vrátil <dvra...@kde.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public + License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. +*/ + +#include <qtest.h> + +#include "kimaptest/fakeserver.h" +#include "kimap/loginjob.h" +#include "kimap/session.h" +#include "kimap/statusjob.h" + +typedef QList<QPair<QByteArray, qint64>> StatusMap; +Q_DECLARE_METATYPE(StatusMap) + +class StatusJobTest: public QObject +{ + Q_OBJECT + +private Q_SLOTS: + + void testStatus_data() + { + QTest::addColumn<QList<QByteArray>>("scenario"); + QTest::addColumn<QList<QByteArray>>("dataItems"); + QTest::addColumn<StatusMap>("results"); + + QList<QByteArray> scenario; + QList<QByteArray> dataItems; + StatusMap results; + scenario << FakeServer::preauth() + << "C: A000001 STATUS \"INBOX\" (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)" + << "S: * STATUS \"INBOX\" (MESSAGES 294 RECENT 1 UIDNEXT 295 UIDVALIDITY 458587604 UNSEEN 181)" + << "S: A000001 OK STATUS Completed"; + dataItems = { "MESSAGES", "RECENT", "UIDNEXT", "UIDVALIDITY", "UNSEEN" }; + results = { { "MESSAGES", 294 }, { "RECENT", 1 }, { "UIDNEXT", 295 }, + { "UIDVALIDITY", 458587604 }, { "UNSEEN", 181 } }; + QTest::newRow("good") << scenario << dataItems << results; + + scenario.clear(); + results.clear(); + scenario << FakeServer::preauth() + << "C: A000001 STATUS \"INBOX\" (MESSAGES UIDNEXT HIGHESTMODSEQ)" + << "S: * STATUS \"INBOX\" (MESSAGES 294 UIDNEXT 295)" + << "S: A000001 OK STATUS Completed"; + dataItems = { "MESSAGES", "UIDNEXT", "HIGHESTMODSEQ" }; + results = { { "MESSAGES", 294 }, { "UIDNEXT", 295 } }; + QTest::newRow("incomplete") << scenario << dataItems << results; + + scenario.clear(); + results.clear(); + scenario << FakeServer::preauth() + << "C: A000001 STATUS \"INBOX\" (HIGHESTMODSEQ)" + << "S: * STATUS \"INBOX\" ()" + << "S: A000001 OK STATUS Completed"; + dataItems = { "HIGHESTMODSEQ" }; + QTest::newRow("empty response") << scenario << dataItems << results; + + scenario.clear(); + results.clear(); + scenario << FakeServer::preauth() + << "C: A000001 STATUS \"INBOX\" (MESSAGES HIGHESTMODSEQ)" + << "S: A000001 NO status failure"; + dataItems = { "MESSAGES", "HIGHESTMODSEQ" }; + results.clear(); + QTest::newRow("no") << scenario << dataItems << results; + + scenario.clear(); + results.clear(); + scenario << FakeServer::preauth() + << "C: A000001 STATUS \"INBOX\" (UIDNEXT)" + << "S: A000001 NO bad command"; + dataItems = { "UIDNEXT" }; + QTest::newRow("bad") << scenario << dataItems << results; + } + + void testStatus() + { + QFETCH(QList<QByteArray>, scenario); + QFETCH(QList<QByteArray>, dataItems); + QFETCH(StatusMap, results); + + FakeServer fakeServer; + fakeServer.setScenario(scenario); + fakeServer.startAndWait(); + + KIMAP::Session session(QStringLiteral("127.0.0.1"), 5989); + KIMAP::StatusJob *job = new KIMAP::StatusJob(&session); + job->setMailBox(QStringLiteral("INBOX")); + job->setDataItems(dataItems); + bool result = job->exec(); + + QEXPECT_FAIL("bad" , "Expected failure on BAD scenario", Continue); + QEXPECT_FAIL("no" , "Expected failure on NO scenario", Continue); + QVERIFY(result); + + if (result) { + const StatusMap status = job->status(); + QCOMPARE(status.count(), results.count()); + for (int i = 0; i < results.count(); ++i) { + QCOMPARE(results[i].first, status[i].first); + QCOMPARE(results[i].second, status[i].second); + } + } + + fakeServer.quit(); + } +}; + +QTEST_GUILESS_MAIN(StatusJobTest) + +#include "statusjobtest.moc" + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimap-15.12.3/src/CMakeLists.txt new/kimap-16.04.1/src/CMakeLists.txt --- old/kimap-15.12.3/src/CMakeLists.txt 2015-11-14 11:20:56.000000000 +0100 +++ new/kimap-16.04.1/src/CMakeLists.txt 2016-04-26 22:18:39.000000000 +0200 @@ -43,6 +43,7 @@ setacljob.cpp setmetadatajob.cpp setquotajob.cpp + statusjob.cpp storejob.cpp subscribejob.cpp unsubscribejob.cpp @@ -111,6 +112,7 @@ SetAclJob SetMetaDataJob SetQuotaJob + StatusJob StoreJob SubscribeJob UnsubscribeJob diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimap-15.12.3/src/session.cpp new/kimap-16.04.1/src/session.cpp --- old/kimap-15.12.3/src/session.cpp 2015-11-14 11:20:56.000000000 +0100 +++ new/kimap-16.04.1/src/session.cpp 2016-04-26 22:18:39.000000000 +0200 @@ -26,6 +26,7 @@ #include <QtCore/QDebug> #include <QtCore/QTimer> +#include <QtCore/QPointer> #include "kimap_debug.h" @@ -124,10 +125,11 @@ void SessionPrivate::handleSslError(const KSslErrorUiData &errorData) { - const bool ignoreSslError = uiProxy && uiProxy->ignoreSslError(errorData); //ignoreSslError is async, so the thread might already be gone when it returns - if (thread) { - thread->sslErrorHandlerResponse(ignoreSslError); + QPointer<SessionThread> _t = thread; + const bool ignoreSslError = uiProxy && uiProxy->ignoreSslError(errorData); + if (_t) { + _t->sslErrorHandlerResponse(ignoreSslError); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimap-15.12.3/src/statusjob.cpp new/kimap-16.04.1/src/statusjob.cpp --- old/kimap-15.12.3/src/statusjob.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/kimap-16.04.1/src/statusjob.cpp 2016-04-26 22:18:39.000000000 +0200 @@ -0,0 +1,123 @@ +/* + Copyright (c) 2016 Daniel Vrátil <dvra...@kde.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public + License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. +*/ + +#include "statusjob.h" +#include "job_p.h" +#include "message_p.h" +#include "session_p.h" +#include "rfccodecs.h" +#include "kimap_debug.h" + +#include <KLocalizedString> + +namespace KIMAP +{ + +class StatusJobPrivate : public JobPrivate +{ +public: + explicit StatusJobPrivate(Session *session, const QString &name) + : JobPrivate(session, name) + { + } + + ~StatusJobPrivate() + { + } + + QString mailBox; + QList<QByteArray> dataItems; + QList<QPair<QByteArray, qint64>> status; +}; + +} + +using namespace KIMAP; + +StatusJob::StatusJob(Session *session) + : Job(*new StatusJobPrivate(session, i18nc("name of the status job", "Status"))) +{ +} + +StatusJob::~StatusJob() +{ +} + +void StatusJob::setMailBox(const QString &mailBox) +{ + Q_D(StatusJob); + d->mailBox = mailBox; +} + +QString StatusJob::mailBox() const +{ + Q_D(const StatusJob); + return d->mailBox; +} + +void StatusJob::setDataItems(const QList<QByteArray> &dataItems) +{ + Q_D(StatusJob); + d->dataItems = dataItems; +} + +QList<QByteArray> StatusJob::dataItems() const +{ + Q_D(const StatusJob); + return d->dataItems; +} + +QList<QPair<QByteArray, qint64>> StatusJob::status() const +{ + Q_D(const StatusJob); + return d->status; +} + +void StatusJob::doStart() +{ + Q_D(StatusJob); + + const QByteArray params = '\"' + KIMAP::encodeImapFolderName(d->mailBox.toUtf8()) + "\" (" + + d->dataItems.join(' ') + ')'; + + d->tags << d->sessionInternal()->sendCommand("STATUS", params); +} + +void StatusJob::handleResponse(const Message &response) +{ + Q_D(StatusJob); + + if (handleErrorReplies(response) == NotHandled) { + if (response.content.size() >= 3) { + const QByteArray code = response.content[1].toString(); + if (code == "STATUS") { + + const QList<QByteArray> resp = response.content[3].toList(); + for (int i = 0; i < resp.size(); i += 2) { + d->status << (qMakePair(resp[i], resp[i + 1].toLongLong())); + } + + } else if (code == "OK") { + return; + } else { + qCDebug(KIMAP_LOG) << response.toString(); + } + } + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimap-15.12.3/src/statusjob.h new/kimap-16.04.1/src/statusjob.h --- old/kimap-15.12.3/src/statusjob.h 1970-01-01 01:00:00.000000000 +0100 +++ new/kimap-16.04.1/src/statusjob.h 2016-04-26 22:18:39.000000000 +0200 @@ -0,0 +1,59 @@ +/* + Copyright (c) 2016 Daniel Vrátil <dvra...@kde.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public + License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. +*/ + +#ifndef KIMAP_STATUSJOB_H +#define KIMAP_STATUSJOB_H + +#include "kimap_export.h" + +#include "job.h" +#include <QList> + +namespace KIMAP +{ +class Session; +class StatusJobPrivate; + +class KIMAP_EXPORT StatusJob : public Job +{ + Q_OBJECT + Q_DECLARE_PRIVATE(StatusJob) + + friend class StatusJobPrivate; + +public: + explicit StatusJob(Session *session); + ~StatusJob(); + + void setMailBox(const QString &mailBox); + QString mailBox() const; + + void setDataItems(const QList<QByteArray> &dataItems); + QList<QByteArray> dataItems() const; + + QList<QPair<QByteArray, qint64>> status() const; + +protected: + void doStart() Q_DECL_OVERRIDE; + void handleResponse(const Message &response) Q_DECL_OVERRIDE; +}; + +} + +#endif // KIMAP_STATUSJOB_H