summaryrefslogtreecommitdiffstats
path: root/installerbuilder/libinstaller/downloadarchivesjob.cpp
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@nokia.com>2011-11-25 14:30:24 +0100
committerKarsten Heimrich <karsten.heimrich@nokia.com>2011-11-28 13:15:07 +0100
commite7666985a46e40ff6569c4bc2f0e96987c5ab622 (patch)
treec3ba15abdae5bc7591f011c195627940c09c7f08 /installerbuilder/libinstaller/downloadarchivesjob.cpp
parent995ea7db1801925d63e94d3c196bd60d5b40134b (diff)
Add authentication support to the downloaders.
Change-Id: If2317d5aded40819f62fa942b3a8af53c954689c Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'installerbuilder/libinstaller/downloadarchivesjob.cpp')
-rw-r--r--installerbuilder/libinstaller/downloadarchivesjob.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/installerbuilder/libinstaller/downloadarchivesjob.cpp b/installerbuilder/libinstaller/downloadarchivesjob.cpp
index cbd782f33..dbfb471f6 100644
--- a/installerbuilder/libinstaller/downloadarchivesjob.cpp
+++ b/installerbuilder/libinstaller/downloadarchivesjob.cpp
@@ -316,6 +316,11 @@ KDUpdater::FileDownloader *DownloadArchivesJob::setupDownloader(const QString &p
downloader->setUrl(url);
downloader->setAutoRemoveDownloadedFile(false);
+ QAuthenticator auth;
+ auth.setUser(component->value(QLatin1String("username")));
+ auth.setPassword(component->value(QLatin1String("password")));
+ downloader->setAuthenticator(auth);
+
connect(downloader, SIGNAL(downloadCanceled()), this, SLOT(downloadCanceled()));
connect(downloader, SIGNAL(downloadAborted(QString)), this, SLOT(downloadFailed(QString)),
Qt::QueuedConnection);