diff options
Diffstat (limited to 'installerbuilder/libinstaller/getrepositorymetainfojob.cpp')
-rw-r--r-- | installerbuilder/libinstaller/getrepositorymetainfojob.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/installerbuilder/libinstaller/getrepositorymetainfojob.cpp b/installerbuilder/libinstaller/getrepositorymetainfojob.cpp index ba7e1574a..fc6cce5b5 100644 --- a/installerbuilder/libinstaller/getrepositorymetainfojob.cpp +++ b/installerbuilder/libinstaller/getrepositorymetainfojob.cpp @@ -49,6 +49,8 @@ #include <QtGui/QMessageBox> +#include <QtNetwork/QAuthenticator> + #include <QtXml/QDomDocument> #include <QtXml/QDomElement> @@ -212,6 +214,11 @@ void GetRepositoryMetaInfoJob::startUpdatesXmlDownload() m_downloader->setUrl(QUrl(url.toString() + QString(QLatin1String("/Updates.xml?")).append( QString::number(qrand() * qrand())))); + QAuthenticator auth; + auth.setUser(m_repository.username()); + auth.setPassword(m_repository.password()); + m_downloader->setAuthenticator(auth); + m_downloader->setAutoRemoveDownloadedFile(false); connect(m_downloader, SIGNAL(downloadCompleted()), this, SLOT(updatesXmlDownloadFinished())); connect(m_downloader, SIGNAL(downloadCanceled()), this, SLOT(updatesXmlDownloadCanceled())); @@ -380,6 +387,11 @@ void GetRepositoryMetaInfoJob::fetchNextMetaInfo() m_downloader->setUrl(url); m_downloader->setAutoRemoveDownloadedFile(true); + QAuthenticator auth; + auth.setUser(m_repository.username()); + auth.setPassword(m_repository.password()); + m_downloader->setAuthenticator(auth); + connect(m_downloader, SIGNAL(downloadCanceled()), this, SLOT(metaDownloadCanceled())); connect(m_downloader, SIGNAL(downloadCompleted()), this, SLOT(metaDownloadFinished())); connect(m_downloader, SIGNAL(downloadAborted(QString)), this, SLOT(metaDownloadError(QString)), |