]> git.sur5r.net Git - minitube/blobdiff - src/yt3.cpp
Update upstream source from tag 'upstream/3.5.1'
[minitube] / src / yt3.cpp
index c8081b6282cec1c7763a0459e8a1f002d405d1ce..dcd21332d9687a97f891af25433ede5272d224c9 100644 (file)
@@ -18,8 +18,8 @@
 #define STRINGIFY(x) STR(x)
 
 YT3 &YT3::instance() {
-    static YT3 *i = new YT3();
-    return *i;
+    static YT3 i;
+    return i;
 }
 
 const QString &YT3::baseUrl() {
@@ -28,7 +28,6 @@ const QString &YT3::baseUrl() {
 }
 
 YT3::YT3() {
-    initApiKeys();
 }
 
 void YT3::initApiKeys() {
@@ -61,7 +60,7 @@ void YT3::initApiKeys() {
 
     if (keys.isEmpty()) {
         qWarning() << "No available API keys";
-#ifdef APP_LINUX
+#ifdef APP_LINUX_NO
         QMetaObject::invokeMethod(MainWindow::instance(), "missingKeyWarning",
                                   Qt::QueuedConnection);
 #endif
@@ -78,7 +77,7 @@ void YT3::testApiKey() {
     q.addQueryItem("chart", "mostPopular");
     q.addQueryItem("maxResults", "1");
     url.setQuery(q);
-    QObject *reply = HttpUtils::yt().get(url);
+    QObject *reply = HttpUtils::stealthAndNotCached().get(url);
     connect(reply, SIGNAL(finished(HttpReply)), SLOT(testResponse(HttpReply)));
 }