summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/downloadarchivesjob.cpp
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@digia.com>2014-03-05 11:48:57 +0100
committerKarsten Heimrich <karsten.heimrich@digia.com>2014-03-25 14:12:41 +0100
commitd2815ad5a6d836bd67f1002b1a6fe2733e9b1b79 (patch)
treeb51561fa5057e742e81f393bf6badb10e9d0627b /src/libs/installer/downloadarchivesjob.cpp
parentdc70e9b9bbe086dee04640c4196eabf9c91b05be (diff)
Unify access to the supported schemes.
Fixes an issue that https downloaded files where not properly named and put in the right temporary download directory. Change-Id: I8a973e8b63cfae2f575d84591a8ebbef53d45a3a Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Diffstat (limited to 'src/libs/installer/downloadarchivesjob.cpp')
-rw-r--r--src/libs/installer/downloadarchivesjob.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libs/installer/downloadarchivesjob.cpp b/src/libs/installer/downloadarchivesjob.cpp
index 82f9b365c..620eedd60 100644
--- a/src/libs/installer/downloadarchivesjob.cpp
+++ b/src/libs/installer/downloadarchivesjob.cpp
@@ -319,10 +319,9 @@ KDUpdater::FileDownloader *DownloadArchivesJob::setupDownloader(const QString &s
Qt::QueuedConnection);
connect(downloader, SIGNAL(downloadStatus(QString)), this, SIGNAL(downloadStatusChanged(QString)));
- if (scheme == QLatin1String("http") || scheme == QLatin1String("ftp") ||
- scheme == QLatin1String("file")) {
- downloader->setDownloadedFileName(component->localTempPath() + QLatin1String("/")
- + component->name() + QLatin1String("/") + fi.fileName() + suffix);
+ if (FileDownloaderFactory::isSupportedScheme(scheme)) {
+ downloader->setDownloadedFileName(component->localTempPath() + QLatin1Char('/')
+ + component->name() + QLatin1Char('/') + fi.fileName() + suffix);
}
QString message = tr("Downloading archive hash for component: %1");