summaryrefslogtreecommitdiff
path: root/src/downloadmanager.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2015-05-11 21:37:12 +0200
committerTannin <devnull@localhost>2015-05-11 21:37:12 +0200
commit5a908442d646b5f3dbf7d22fc2331c8cc2b0d15a (patch)
treeda512fa0d23e2e351104d6703d71d314b5423021 /src/downloadmanager.cpp
parent328244692b9e4bd216be95edbb0d0f944dbcb34a (diff)
dropping an url on the download widget now attempts to download the url
Diffstat (limited to 'src/downloadmanager.cpp')
-rw-r--r--src/downloadmanager.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index 81732f4d..e48d6bf1 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -358,7 +358,6 @@ bool DownloadManager::addDownload(QNetworkReply *reply, const QStringList &URLs,
DownloadInfo *newDownload = DownloadInfo::createNew(fileInfo, URLs);
QString baseName = fileName;
-
if (!fileInfo->fileName.isEmpty()) {
baseName = fileInfo->fileName;
} else {
@@ -368,7 +367,6 @@ bool DownloadManager::addDownload(QNetworkReply *reply, const QStringList &URLs,
baseName = dispoName;
}
}
-
if (QFile::exists(m_OutputDirectory + "/" + baseName) &&
(QMessageBox::question(nullptr, tr("Download again?"), tr("A file with the same name has already been downloaded. "
"Do you want to download it again? The new file will receive a different name."),
@@ -377,11 +375,9 @@ bool DownloadManager::addDownload(QNetworkReply *reply, const QStringList &URLs,
delete newDownload;
return false;
}
-
newDownload->setName(getDownloadFileName(baseName), false);
startDownload(reply, newDownload, false);
-
// emit update(-1);
return true;
}
@@ -1234,7 +1230,8 @@ bool DownloadManager::ServerByPreference(const std::map<QString, int> &preferred
int DownloadManager::startDownloadURLs(const QStringList &urls)
{
- addDownload(urls, -1, -1, nullptr);
+ ModRepositoryFileInfo info;
+ addDownload(urls, -1, -1, &info);
return m_ActiveDownloads.size() - 1;
}