]> git.sur5r.net Git - minitube/blobdiff - src/paginatedvideosource.cpp
Removed debug statements
[minitube] / src / paginatedvideosource.cpp
index 5af68522708db177a87cfb30e991b59b65cdf1dd..115cf1f1c06a6d9e066f67f7bba48d98f8788d35 100644 (file)
@@ -23,6 +23,7 @@ $END_LICENSE */
 #include "yt3.h"
 #include "yt3listparser.h"
 #include "datautils.h"
+#include "compatibility/qurlqueryhelper.h"
 
 #include "video.h"
 #include "networkaccess.h"
@@ -34,13 +35,12 @@ QHash<QString, QAction*>* globalActions();
 
 PaginatedVideoSource::PaginatedVideoSource(QObject *parent) : VideoSource(parent)
   , tokenTimestamp(0)
-  , reloadingToken(false)
   , currentMax(0)
   , currentStartIndex(0)
+  , reloadingToken(false)
   , asyncDetails(false) { }
 
 bool PaginatedVideoSource::hasMoreVideos() {
-    qDebug() << __PRETTY_FUNCTION__ << nextPageToken;
     return !nextPageToken.isEmpty();
 }
 
@@ -110,20 +110,11 @@ void PaginatedVideoSource::loadVideoDetails(const QList<Video*> &videos) {
     }
 
     QUrl url = YT3::instance().method("videos");
-
-#if QT_VERSION >= 0x050000
     {
-        QUrl &u = url;
-        QUrlQuery url;
-#endif
-
-        url.addQueryItem("part", "contentDetails,statistics");
-        url.addQueryItem("id", videoIds);
-
-#if QT_VERSION >= 0x050000
-        u.setQuery(url);
+        QUrlQueryHelper urlHelper(url);
+        urlHelper.addQueryItem("part", "contentDetails,statistics");
+        urlHelper.addQueryItem("id", videoIds);
     }
-#endif
 
     QObject *reply = The::http()->get(url);
     connect(reply, SIGNAL(data(QByteArray)), SLOT(parseVideoDetails(QByteArray)));