summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Pol <[email protected]>2017-03-16 13:55:38 +0100
committerAleix Pol <[email protected]>2017-03-16 14:02:42 +0100
commite109cd4f0c4b9cd4d427a737c876bb87b31a3b3d (patch)
treea085add3f762500065d406b2e9ba2968c1feff81
parentf5b9584f1d6d0fcf8cc7cf25fd031e5ab8ba60f2 (diff)
Fix build
Popcon was removed reviewsReady got a new argument
-rw-r--r--libdiscover/backends/SnapBackend/SnapReviewsBackend.cpp2
-rw-r--r--libdiscover/tests/CMakeLists.txt1
-rw-r--r--libdiscover/tests/PopConParserTest.cpp62
3 files changed, 1 insertions, 64 deletions
diff --git a/libdiscover/backends/SnapBackend/SnapReviewsBackend.cpp b/libdiscover/backends/SnapBackend/SnapReviewsBackend.cpp
index 250a38e..3d196b8 100644
--- a/libdiscover/backends/SnapBackend/SnapReviewsBackend.cpp
+++ b/libdiscover/backends/SnapBackend/SnapReviewsBackend.cpp
@@ -32,7 +32,7 @@ SnapReviewsBackend::SnapReviewsBackend(SnapBackend* parent)
void SnapReviewsBackend::fetchReviews(AbstractResource* app, int page)
{
- emit reviewsReady({}, {});
+ emit reviewsReady({}, {}, false);
}
Rating* SnapReviewsBackend::ratingForApplication(AbstractResource* app) const
diff --git a/libdiscover/tests/CMakeLists.txt b/libdiscover/tests/CMakeLists.txt
index 1871ba3..12e436d 100644
--- a/libdiscover/tests/CMakeLists.txt
+++ b/libdiscover/tests/CMakeLists.txt
@@ -1,2 +1 @@
ecm_add_test(CategoriesTest.cpp TEST_NAME CategoriesTest LINK_LIBRARIES Qt5::Test Qt5::Gui Discover::Common)
-ecm_add_test(PopConParserTest.cpp TEST_NAME PopConParserTest LINK_LIBRARIES Qt5::Test Qt5::Gui KF5::Archive Qt5::Network Discover::Common)
diff --git a/libdiscover/tests/PopConParserTest.cpp b/libdiscover/tests/PopConParserTest.cpp
deleted file mode 100644
index e43edfa..0000000
--- a/libdiscover/tests/PopConParserTest.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2015 Aleix Pol Gonzalez <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library/Lesser General Public License
- * version 2, or (at your option) any later version, as published by the
- * Free Software Foundation
- *
- * This program 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 General Public License for more details
- *
- * You should have received a copy of the GNU Library/Lesser General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include <QtTest>
-#include <QList>
-#include <QNetworkReply>
-#include <QNetworkAccessManager>
-#include <KCompressionDevice>
-#include <ReviewsBackend/PopConParser.h>
-#include <ReviewsBackend/Rating.h>
-
-class PopConParserTest : public QObject
-{
- Q_OBJECT
-public:
- PopConParserTest() {}
-
-private Q_SLOTS:
- void testPopConParser() {
- const QUrl ratingsUrl(QStringLiteral("http://appstream.kubuntu.co.uk/appstream-ubuntu-popcon-results.gz"));
- QNetworkAccessManager manager;
- auto reply = manager.get(QNetworkRequest(ratingsUrl));
- QSignalSpy spy(reply, &QNetworkReply::finished);
- QVERIFY(spy.count() || spy.wait());
-
- auto data = reply->readAll();
- QBuffer buffer(&data);
-
- QScopedPointer<QIODevice> dev(new KCompressionDevice(&buffer, false, KCompressionDevice::GZip));
- QVERIFY(dev->open(QIODevice::ReadOnly));
-
- QHash<QString, Rating *> m_ratings;
- PopConParser::parsePopcon(this, dev.data(), m_ratings);
- for(auto it = m_ratings.constBegin(), itEnd = m_ratings.constEnd(); it!=itEnd; ++it) {
- QVERIFY(!it.key().isEmpty());
- Rating * r = it.value();
- QVERIFY(!r->packageName().isEmpty());
- }
- QVERIFY(!m_ratings.isEmpty());
- qDeleteAll(m_ratings);
- }
-};
-
-QTEST_MAIN( PopConParserTest )
-
-#include "PopConParserTest.moc"