Hello community,
here is the log from the commit of package attica-qt5 for openSUSE:Factory checked in at 2019-04-19 21:20:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/attica-qt5 (Old)
and /work/SRC/openSUSE:Factory/.attica-qt5.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "attica-qt5"
Fri Apr 19 21:20:12 2019 rev:66 rq:695191 version:5.57.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/attica-qt5/attica-qt5.changes 2019-03-21 09:42:26.546950869 +0100
+++ /work/SRC/openSUSE:Factory/.attica-qt5.new.5536/attica-qt5.changes 2019-04-19 21:20:13.755556177 +0200
@@ -1,0 +2,13 @@
+Sun Apr 14 20:21:40 UTC 2019 - lbeltrame@kde.org
+
+- Update to 5.57.0
+ * New feature release
+ * For more details please see:
+ * https://www.kde.org/announcements/kde-frameworks-5.57.0.php
+- Changes since 5.56.0:
+ * Accept any HTTP status between 100 and 199 as benign
+ * Additions for ProviderManager documentation
+ * [attica] compile without foreach
+ * autotests: use new signal failedToLoad in ProviderTest
+
+-------------------------------------------------------------------
Old:
----
attica-5.56.0.tar.xz
New:
----
attica-5.57.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ attica-qt5.spec ++++++
--- /var/tmp/diff_new_pack.kiocdx/_old 2019-04-19 21:20:14.931557730 +0200
+++ /var/tmp/diff_new_pack.kiocdx/_new 2019-04-19 21:20:14.955557762 +0200
@@ -19,13 +19,13 @@
%define sonum 5
%define rname attica
%define _libname KF5Attica
-%define _tar_path 5.56
+%define _tar_path 5.57
# Full KF5 version (e.g. 5.33.0)
%{!?_kf5_version: %global _kf5_version %{version}}
# Last major and minor KF5 version (e.g. 5.33)
%{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')}
Name: attica-qt5
-Version: 5.56.0
+Version: 5.57.0
Release: 0
Summary: Open Collaboration Service client library
License: LGPL-2.1-or-later
++++++ attica-5.56.0.tar.xz -> attica-5.57.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/attica-5.56.0/.gitignore new/attica-5.57.0/.gitignore
--- old/attica-5.56.0/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/attica-5.57.0/.gitignore 2019-04-07 09:16:08.000000000 +0200
@@ -0,0 +1,21 @@
+# Ignore the following files
+*~
+*.[oa]
+*.diff
+*.kate-swp
+*.kdev4
+.kdev_include_paths
+*.kdevelop.pcs
+*.moc
+*.moc.cpp
+*.orig
+*.user
+.*.swp
+.swp.*
+Doxyfile
+Makefile
+avail
+random_seed
+/build*/
+CMakeLists.txt.user*
+*.unc-backup*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/attica-5.56.0/CMakeLists.txt new/attica-5.57.0/CMakeLists.txt
--- old/attica-5.56.0/CMakeLists.txt 2019-03-02 14:23:27.000000000 +0100
+++ new/attica-5.57.0/CMakeLists.txt 2019-04-07 09:16:08.000000000 +0200
@@ -1,11 +1,11 @@
cmake_minimum_required(VERSION 3.5)
-set(KF5_VERSION "5.56.0") # handled by release scripts
+set(KF5_VERSION "5.57.0") # handled by release scripts
project(Attica VERSION ${KF5_VERSION})
# ECM setup
include(FeatureSummary)
-find_package(ECM 5.56.0 NO_MODULE)
+find_package(ECM 5.57.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,6 +41,7 @@
# Enable static build
option(ATTICA_STATIC_BUILD "Build a static library" Off)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00)
+add_definitions(-DQT_NO_FOREACH)
add_subdirectory(src)
# Enable unit testing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/attica-5.56.0/README.md new/attica-5.57.0/README.md
--- old/attica-5.56.0/README.md 2019-03-02 14:23:27.000000000 +0100
+++ new/attica-5.57.0/README.md 2019-04-07 09:16:08.000000000 +0200
@@ -12,3 +12,4 @@
The library is used in KNewStuff3 as content provider.
In order to integrate with KDE's Plasma Desktop, a platform plugin exists in kdebase.
+Your basic entrypoint for using Attica's functionality is the Attica::ProviderManager class.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/attica-5.56.0/autotests/providertest.cpp new/attica-5.57.0/autotests/providertest.cpp
--- old/attica-5.56.0/autotests/providertest.cpp 2019-03-02 14:23:27.000000000 +0100
+++ new/attica-5.57.0/autotests/providertest.cpp 2019-04-07 09:16:08.000000000 +0200
@@ -56,13 +56,12 @@
Attica::ProviderManager *m_manager;
QEventLoop *m_eventloop;
QTimer m_timer;
- bool m_checkFail;
+ bool m_errorReceived = false;
};
ProviderTest::ProviderTest()
: m_manager(nullptr),
- m_eventloop(new QEventLoop),
- m_checkFail(true)
+ m_eventloop(new QEventLoop)
{
QLoggingCategory::setFilterRules(QStringLiteral("org.kde.attica.debug=true"));
}
@@ -70,6 +69,7 @@
ProviderTest::~ProviderTest()
{
delete m_manager;
+ delete m_eventloop;
}
void ProviderTest::slotDefaultProvidersLoaded()
@@ -86,12 +86,17 @@
void ProviderTest::initProvider(const QUrl &url)
{
+ m_errorReceived = false;
delete m_manager;
m_manager = new Attica::ProviderManager;
m_manager->setAuthenticationSuppressed(true);
connect(m_manager, &ProviderManager::defaultProvidersLoaded, this, &ProviderTest::slotDefaultProvidersLoaded);
connect(m_manager, &ProviderManager::providerAdded, this, &ProviderTest::providerAdded);
m_manager->addProviderFile(url);
+ connect(m_manager, &Attica::ProviderManager::failedToLoad, this, [this]() {
+ m_errorReceived = true;
+ m_eventloop->quit();
+ });
m_timer.singleShot(5000, this, &ProviderTest::slotTimeout);
m_eventloop->exec();
@@ -128,19 +133,16 @@
void ProviderTest::slotTimeout()
{
- if (m_eventloop->isRunning()) {
- m_eventloop->exit();
- if (m_checkFail)
- QFAIL("Could not fetch provider");
- }
+ QVERIFY(m_eventloop->isRunning());
+ m_eventloop->exit();
+ QFAIL("Timeout fetching provider");
}
void ProviderTest::testFetchInvalidProvider()
{
- // TODO error state could only be checked indirectly by timeout
- m_checkFail = false;
initProvider(QUrl(QLatin1String("https://invalid-url.org/ocs/providers.xml")));
QVERIFY(m_manager->providers().size() == 0);
+ QVERIFY(m_errorReceived);
}
QTEST_GUILESS_MAIN(ProviderTest)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/attica-5.56.0/src/atticabasejob.cpp new/attica-5.57.0/src/atticabasejob.cpp
--- old/attica-5.56.0/src/atticabasejob.cpp 2019-03-02 14:23:27.000000000 +0100
+++ new/attica-5.57.0/src/atticabasejob.cpp 2019-04-07 09:16:08.000000000 +0200
@@ -114,7 +114,7 @@
QByteArray data = d->m_reply->readAll();
//qCDebug(ATTICA) << "XML Returned:\n" << data;
parse(QString::fromUtf8(data.constData()));
- if (d->m_metadata.statusCode() == 100) {
+ if (d->m_metadata.statusCode() >= 100 && d->m_metadata.statusCode() < 200) {
d->m_metadata.setError(Metadata::NoError);
} else {
d->m_metadata.setError(Metadata::OcsError);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/attica-5.56.0/src/provider.cpp new/attica-5.57.0/src/provider.cpp
--- old/attica-5.56.0/src/provider.cpp 2019-03-02 14:23:27.000000000 +0100
+++ new/attica-5.57.0/src/provider.cpp 2019-04-07 09:16:08.000000000 +0200
@@ -477,12 +477,14 @@
postParameters.insert(QLatin1String("explanation"), newAchievement.explanation());
postParameters.insert(QLatin1String("points"), QString::number(newAchievement.points()));
postParameters.insert(QLatin1String("image"), newAchievement.image().toLocalFile());
- foreach (const QString &dependency, newAchievement.dependencies()) {
+ const auto dependenciesList = newAchievement.dependencies();
+ for (const QString &dependency : dependenciesList) {
postParameters.insert(QString::fromLatin1("dependencies[%1]").arg(QString::number(i++)), dependency);
}
postParameters.insert(QLatin1String("type"), Achievement::achievementTypeToString(newAchievement.type()));
- foreach (const QString &option, newAchievement.options()) {
+ const auto optionsList = newAchievement.options();
+ for (const QString &option : optionsList) {
postParameters.insert(QString::fromLatin1("options[%1]").arg(QString::number(j++)), option);
}
@@ -510,12 +512,14 @@
postParameters.insert(QLatin1String("explanation"), achievement.explanation());
postParameters.insert(QLatin1String("points"), QString::number(achievement.points()));
postParameters.insert(QLatin1String("image"), achievement.image().toLocalFile());
- foreach (const QString &dependency, achievement.dependencies()) {
+ const auto dependenciesList = achievement.dependencies();
+ for (const QString &dependency : dependenciesList) {
postParameters.insert(QString::fromLatin1("dependencies[%1]").arg(QString::number(i++)), dependency);
}
postParameters.insert(QLatin1String("type"), Achievement::achievementTypeToString(achievement.type()));
- foreach (const QString &option, achievement.options()) {
+ const auto optionsList = achievement.options();
+ for (const QString &option : optionsList) {
postParameters.insert(QString::fromLatin1("options[%1]").arg(QString::number(j++)), option);
}
@@ -1100,13 +1104,13 @@
q.addQueryItem(QStringLiteral("categories"), categoryIds.join(QLatin1String("x")));
QStringList distributionIds;
- foreach (const Distribution &distribution, distributions) {
+ for (const Distribution &distribution : distributions) {
distributionIds.append(QString(distribution.id()));
}
q.addQueryItem(QStringLiteral("distribution"), distributionIds.join(QLatin1String(",")));
QStringList licenseIds;
- foreach (const License &license, licenses) {
+ for (const License &license : licenses) {
licenseIds.append(QString(license.id()));
}
q.addQueryItem(QStringLiteral("license"), licenseIds.join(QLatin1String(",")));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/attica-5.56.0/src/providermanager.cpp new/attica-5.57.0/src/providermanager.cpp
--- old/attica-5.56.0/src/providermanager.cpp 2019-03-02 14:23:27.000000000 +0100
+++ new/attica-5.57.0/src/providermanager.cpp 2019-04-07 09:16:08.000000000 +0200
@@ -103,7 +103,8 @@
void ProviderManager::slotLoadDefaultProvidersInternal()
{
- foreach (const QUrl &url, d->m_internals->getDefaultProviderFiles()) {
+ const auto providerFiles = d->m_internals->getDefaultProviderFiles();
+ for (const QUrl &url : providerFiles) {
addProviderFile(url);
}
if (d->m_downloads.isEmpty()) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/attica-5.56.0/src/providermanager.h new/attica-5.57.0/src/providermanager.h
--- old/attica-5.56.0/src/providermanager.h 2019-03-02 14:23:27.000000000 +0100
+++ new/attica-5.57.0/src/providermanager.h 2019-04-07 09:16:08.000000000 +0200
@@ -45,11 +45,27 @@
* Provider files are defined here:
* http://www.freedesktop.org/wiki/Specifications/open-collaboration-services
*
- * <pre>
- provider file example
- * </pre>
+ * \section basicuse Basic Use
*
- * Once you have loaded a Provider, use its functions to access the service.
+ * See addProviderFileToDefaultProviders(const QUrl &url) for an example of
+ * what the provider file sohuld look like. You can add providers to the
+ * ProviderManager as either raw XML data using addProviderFromXml(const QString &providerXml),
+ * or from a file somewhere on the system through addProviderFile(const QUrl &file),
+ * or you can simply load the default providers provided by your system
+ * (which generally means KDE's provider opendesktop.org).
+ *
+ * Importantly, to be able to detect when the ProviderManager is ready to
+ * manage things, before initialising it you will want to connect to the
+ * providerAdded(const Attica::Provider &provider) signal, which is fired
+ * every time a new provider is added to the manager.
+ *
+ * If you manually add all providers from XML, you can expect this to happen
+ * immediately. This means that once you have added your providers that way,
+ * you can access them through the providers() function, which returns
+ * a list of all loaded Providers.
+ *
+ * Once you have loaded a Provider, you can use its functions to access the
+ * services offered by that provider.
*/
class ATTICA_EXPORT ProviderManager : public QObject
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/attica-5.56.0/tests/projecttest/projecttest.cpp new/attica-5.57.0/tests/projecttest/projecttest.cpp
--- old/attica-5.56.0/tests/projecttest/projecttest.cpp 2019-03-02 14:23:27.000000000 +0100
+++ new/attica-5.57.0/tests/projecttest/projecttest.cpp 2019-04-07 09:16:08.000000000 +0200
@@ -183,9 +183,9 @@
project.setVersion(m_editor->version->text());
project.setLicense(m_editor->license->text());
project.setUrl(m_editor->url->text());
- QStringList _d = m_editor->developers->text().split(QLatin1Char(','));
+ const QStringList _d = m_editor->developers->text().split(QLatin1Char(','));
QStringList devs;
- foreach (const QString &dev, _d) {
+ for (const QString &dev : _d) {
devs << dev.trimmed();
}
project.setDevelopers(devs);
@@ -293,7 +293,8 @@
qDebug() << "Yay, no errors ...";
QStringList projectIds;
- foreach (const Project &p, listJob->itemList()) {
+ const auto itemList = listJob->itemList();
+ for (const Project &p : itemList) {
m_projects[p.id()] = p;
qDebug() << "New project:" << p.id() << p.name();
output.append(QString(QLatin1String("<br />%1 (%2)")).arg(p.name(), p.id()));
@@ -325,7 +326,8 @@
Attica::ListJob<BuildService> *listJob = static_cast