[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bmuon=5D_installer/ReviewsBackend=3A_Adapt_to_an_API?=
From:       Jonathan Thomas <echidnaman () kubuntu ! org>
Date:       2011-06-01 14:40:32
Message-ID: 20110601144032.DCF27A60A4 () git ! kde ! org
[Download RAW message or body]

Git commit 46d552e9e1a4b4ceaa98d93763c4d03a8fbb86cc by Jonathan Thomas.
Committed on 01/06/2011 at 16:39.
Pushed by jmthomas into branch 'master'.

Adapt to an API change with the Ubuntu Reviews Backend to fix reviews not loading.
Also default the distro series filtering to "any".

M  +3    -11   installer/ReviewsBackend/ReviewsBackend.cpp     

http://commits.kde.org/muon/46d552e9e1a4b4ceaa98d93763c4d03a8fbb86cc

diff --git a/installer/ReviewsBackend/ReviewsBackend.cpp b/installer/ReviewsBackend/ReviewsBackend.cpp
index 21cbf83..844249e 100644
--- a/installer/ReviewsBackend/ReviewsBackend.cpp
+++ b/installer/ReviewsBackend/ReviewsBackend.cpp
@@ -20,7 +20,6 @@
 
 #include "ReviewsBackend.h"
 
-#include <QtCore/QProcess>
 #include <QtCore/QStringBuilder>
 
 #include <KGlobal>
@@ -146,13 +145,6 @@ void ReviewsBackend::fetchReviews(Application *app)
     QString lang = getLanguage();
     QString origin = app->package()->origin().toLower();
 
-    QString program = QLatin1String("lsb_release -c -s");
-    QProcess lsb_release;
-    lsb_release.start(program);
-    lsb_release.waitForFinished();
-    QString distroSeries = lsb_release.readAllStandardOutput();
-    distroSeries = distroSeries.trimmed();
-
     QString version = QLatin1String("any");
     QString packageName = app->package()->latin1Name();
     QString appName = app->name();
@@ -164,9 +156,9 @@ void ReviewsBackend::fetchReviews(Application *app)
     // But that could be because the Ubuntu Software Center (which I used to
     // figure it out) is written in python, so you have to go hunting to where
     // a variable was initially initialized with a primitive to figure out its type.
-    KUrl reviewsUrl(m_serverBase % lang % '/' % origin % '/' % distroSeries %
-                    '/' % version % '/' % packageName % ';' % appName % '/' %
-                    QLatin1Literal("page") % '/' % '1');
+    KUrl reviewsUrl(m_serverBase % QLatin1Literal("reviews/filter/") % lang % '/'
+                    % origin % '/' % QLatin1Literal("any") % '/' % version % '/' % packageName
+                    % ';' % appName % '/' % QLatin1Literal("page") % '/' % '1');
 
     if (m_reviewsFile) {
         m_reviewsFile->deleteLater();

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic