]> git.sur5r.net Git - minitube/blobdiff - src/ytstandardfeed.cpp
Imported Upstream version 2.3
[minitube] / src / ytstandardfeed.cpp
index 50e0674318605a8d1d4c2a61a282ec8cb0308e66..ee5e0030f141a8982754fd5840eec756f7eed638 100644 (file)
@@ -41,6 +41,11 @@ void YTStandardFeed::loadVideos(int max, int skip) {
     if (!category.isEmpty()) s += "_" + category;
 
     QUrl url(s);
+#if QT_VERSION >= 0x050000
+{
+    QUrl &u = url;
+    QUrlQuery url;
+#endif
     url.addQueryItem("v", "2");
 
     if (feedId != "most_shared" && feedId != "on_the_web") {
@@ -52,6 +57,10 @@ void YTStandardFeed::loadVideos(int max, int skip) {
     url.addQueryItem("max-results", QString::number(max));
     url.addQueryItem("start-index", QString::number(skip));
 
+#if QT_VERSION >= 0x050000
+        u.setQuery(url);
+    }
+#endif
     QObject *reply = The::http()->get(url);
     connect(reply, SIGNAL(data(QByteArray)), SLOT(parse(QByteArray)));
     connect(reply, SIGNAL(error(QNetworkReply*)), SLOT(requestError(QNetworkReply*)));