summaryrefslogtreecommitdiffstats
path: root/src/FileDownloader.cpp
diff options
context:
space:
mode:
authorNils Schwabe2014-03-18 17:00:16 +0100
committerNils Schwabe2014-03-18 17:00:16 +0100
commita96170231b65358e169b54d126891df884e65ea2 (patch)
tree72f7e8621b77b39ea10e8d35766056e3ebfd6138 /src/FileDownloader.cpp
parent- Added IconHolder to cache items (diff)
downloadvmchooser2-a96170231b65358e169b54d126891df884e65ea2.tar.gz
vmchooser2-a96170231b65358e169b54d126891df884e65ea2.tar.xz
vmchooser2-a96170231b65358e169b54d126891df884e65ea2.zip
- removed function to load icons locally
- added function to load icon from a given url (xml parameter)
Diffstat (limited to 'src/FileDownloader.cpp')
-rw-r--r--src/FileDownloader.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/FileDownloader.cpp b/src/FileDownloader.cpp
index d72fdd8..dd4022b 100644
--- a/src/FileDownloader.cpp
+++ b/src/FileDownloader.cpp
@@ -20,7 +20,7 @@ FileDownloader::~FileDownloader() {
}
void FileDownloader::connectSlot(QObject* obj, const char* slot) {
- QObject::connect(this, SIGNAL(downloaded(QString& fileName, QByteArray downloadedData)),
+ QObject::connect(this, SIGNAL(downloaded(QString&, QByteArray)),
obj, slot);
}
@@ -29,9 +29,10 @@ void FileDownloader::fileDownloaded(QNetworkReply* pReply) {
//emit a signal
pReply->deleteLater();
emit downloaded(this->fileName, downloadedData);
+ this->deleteLater();
}
void FileDownloader::downloadFile(const QUrl& fileUrl) {
- this->fileName = QFileInfo(fileUrl.toLocalFile()).fileName();
+ this->fileName = fileUrl.toString();
m_WebCtrl.get(QNetworkRequest(fileUrl));
}