QTfrontend/ui/widget/databrowser.cpp
changeset 6616 f77bb02b669f
parent 6060 fdfc01419815
child 6948 7271ce89950f
--- a/QTfrontend/ui/widget/databrowser.cpp	Mon Jan 30 23:20:28 2012 +0100
+++ b/QTfrontend/ui/widget/databrowser.cpp	Mon Jan 30 17:32:18 2012 -0500
@@ -24,19 +24,18 @@
         {
             return resources.take(name.toString());
         }
-        else
-            if(!requestedResources.contains(name.toString()))
-            {
-                qDebug() << "Requesting resource" << name.toString();
-                requestedResources.insert(name.toString());
+        else if(!requestedResources.contains(name.toString()))
+        {
+            qDebug() << "Requesting resource" << name.toString();
+            requestedResources.insert(name.toString());
 
-                QNetworkRequest newRequest(QUrl("http://www.hedgewars.org" + name.toString()));
-                newRequest.setAttribute(typeAttribute, type);
-                newRequest.setAttribute(urlAttribute, name);
+            QNetworkRequest newRequest(QUrl("http://www.hedgewars.org" + name.toString()));
+            newRequest.setAttribute(typeAttribute, type);
+            newRequest.setAttribute(urlAttribute, name);
 
-                QNetworkReply *reply = manager->get(newRequest);
-                connect(reply, SIGNAL(finished()), this, SLOT(resourceDownloaded()));
-            }
+            QNetworkReply *reply = manager->get(newRequest);
+            connect(reply, SIGNAL(finished()), this, SLOT(resourceDownloaded()));
+        }
     }
 
     return QVariant();