summaryrefslogtreecommitdiffstats
path: root/src/DownloadManager.cpp
diff options
context:
space:
mode:
authorJonathan Bauer2011-02-22 13:06:25 +0100
committerJonathan Bauer2011-02-22 13:06:25 +0100
commit825d54d7159a60bcc55693072ebdd1d2e13a121d (patch)
treee3a686a070a31dcbeb1687eebe6b6b230b3147af /src/DownloadManager.cpp
parentfix vtable error (diff)
downloadfbgui-825d54d7159a60bcc55693072ebdd1d2e13a121d.tar.gz
fbgui-825d54d7159a60bcc55693072ebdd1d2e13a121d.tar.xz
fbgui-825d54d7159a60bcc55693072ebdd1d2e13a121d.zip
DownloadManager fixed download initialization.
Diffstat (limited to 'src/DownloadManager.cpp')
-rw-r--r--src/DownloadManager.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/DownloadManager.cpp b/src/DownloadManager.cpp
index 73d979e..b508723 100644
--- a/src/DownloadManager.cpp
+++ b/src/DownloadManager.cpp
@@ -2,9 +2,11 @@
void DownloadManager::downloadFile(QString& filename)
{
+ QUrl u = this->baseUrl.resolved(filename);
+ this->request.setUrl(u);
this->filename = filename;
this->reply = this->qnam->get(this->request);
- qiod = reply;
+ this->qiod = reply;
QObject::connect(this->reply, SIGNAL(finished()), this, SLOT(saveData()));
}
@@ -16,7 +18,7 @@ void DownloadManager::saveData()
qDebug() << "Couldnt open file! exiting...";
exit(1);
}
- outfile.write(this->reply->readAll());
+ outfile.write(this->qiod->readAll());
outfile.close();
}
@@ -34,7 +36,6 @@ void DownloadManager::print()
DownloadManager::DownloadManager()
{
this->qnam = new QNetworkAccessManager();
- this->request.setUrl(baseUrl);
}
DownloadManager::~DownloadManager()