diff ui/downloader.cpp @ 12:9121eea6d93f

Fix constructor usage. Too much Java.
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 14 Feb 2014 11:30:55 +0000
parents 7e2f14c7aba2
children 95e1b6edf2fc
line wrap: on
line diff
--- a/ui/downloader.cpp	Fri Feb 14 11:20:15 2014 +0000
+++ b/ui/downloader.cpp	Fri Feb 14 11:30:55 2014 +0000
@@ -10,18 +10,22 @@
 #include <QFile>
 #include <QDebug>
 
-Downloader::Downloader(QObject* parent, const QString& url)
+Downloader::Downloader(QObject* parent, const QString& url):
+    QThread(parent),
+    mUrl(url)
 {
     QFile certResource(":certificates/https");
     certResource.open(QFile::ReadOnly);
-    Downloader (parent, url, certResource.readAll());
+    mCert = certResource.readAll();
+    certResource.close();
 }
 
 Downloader::Downloader(QObject* parent, const QString& url,
-                       const QByteArray& certificate) :
+                       const QByteArray& certificate):
+    QThread(parent),
     mUrl(url),
-    mCert(certificate),
-    QThread(parent)
+    mCert(certificate)
 {
+
 }
 

http://wald.intevation.org/projects/trustbridge/