change and add some comments, remove some warning
[mdictionary] / src / plugins / xdxf / HttpDownloader.cpp
index 54f8273..753124f 100644 (file)
     Copyright 2010 Comarch S.A.
 
 *******************************************************************************/
-
 /*!
-  \file HttpDownloader.h
-  \author Bartosz Szatkowski <bulislaw@linux.com>
+    \file HttpDownloader.h
+    \author Bartosz Szatkowski <bulislaw@linux.com>
  */
 
-
 #include "HttpDownloader.h"
 
-HttpDownloader::HttpDownloader(QObject *parent) {
+HttpDownloader::HttpDownloader(QObject *parent): QObject(parent) {
     http = new QHttp();
     //connect(http, SIGNAL(requestFinished(int, bool)), this,
      //       SLOT(getPageFinished()));
@@ -48,12 +46,11 @@ void HttpDownloader::download(QUrl url, QString file) {
     request.setRawHeader("User-Agent", "Wget/1.12 (linux-gnu)");
     currentReply = manager->get(request);
     connect(currentReply, SIGNAL(downloadProgress(qint64,qint64)),
-               this, SIGNAL(progress(qint64,qint64)));
-
+            this, SIGNAL(progress(qint64,qint64)));
 }
 
-void HttpDownloader::downloadFinished(QNetworkReply *reply) {
 
+void HttpDownloader::downloadFinished(QNetworkReply *reply) {
     disconnect(reply, SIGNAL(downloadProgress(qint64,qint64)),
                this, SIGNAL(progress(qint64,qint64)));
     if(reply->error() != QNetworkReply::NoError) {
@@ -71,7 +68,7 @@ void HttpDownloader::downloadFinished(QNetworkReply *reply) {
        req.setUrl(r);
        currentReply = manager->get(req);
        connect(currentReply, SIGNAL(downloadProgress(qint64,qint64)),
-                  this, SIGNAL(progress(qint64,qint64)));
+               this, SIGNAL(progress(qint64,qint64)));
     }
     else {
         QFile resultFile(destFile);