diff options
Diffstat (limited to 'src/downloadmanager.cpp')
| -rw-r--r-- | src/downloadmanager.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 9f7a628..eb00354 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -7,6 +7,7 @@ DownloadManager::DownloadManager(){ qxtLog->debug() << "Initializing download manager..."; checkDownloadDirectory(); qnam = new QNetworkAccessManager(); + qnam->moveToThread(&dmThread); dip = false; } // ------------------------------------------------------------------------------------------------------- @@ -197,27 +198,3 @@ void DownloadManager::downloadFinished() } startNextDownload(); } -/******************************************************************************************************** -* - ** dead code: Header filename fetching & renaming ** - -const QByteArray cd = "Content-Disposition"; -QByteArray cdc = currentDownload->rawHeader(cd); -int x = cdc.indexOf("filename=\"") + 10; -cdc.remove(0, x).chop(1); -if (!cdc.isEmpty()) - currentTargetFilename = cdc; -else - currentTargetFilename = QString("download.\%1").arg(downloaded); - -QString tmp = outfile.fileName(); -tmp.remove(0, tmp.lastIndexOf(QChar('/')) + 1); -qDebug() << "Trying to rename " << tmp << " to --> " << currentTargetFilename; - -if (outfile.rename(downloadPath + "/" + currentTargetFilename)) { - qxtLog->debug() << "Renamed file!"; -} -else { - qxtLog->debug() << "Failure to rename file!"; -} -*/ |
