summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/downloadarchivesjob.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-06-10 15:35:33 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-06-15 13:48:13 +0000
commit90135a5b7a31c30322f19e403d697780b552bf19 (patch)
treed64bef2da4d0143c38167eca2ae32d47b7226ced /src/libs/installer/downloadarchivesjob.cpp
parent80b2694aede1ed736c619f76cb7b6250a913635b (diff)
Convert to Qt 5 connect syntax
Convert to new signal/slot syntax where it does not make things more complicated: connections where the signal or slot is an overloaded method, or where the receiver method is not in a QObject, are left alone. The new syntax allows compile-time checking of the connection. Change-Id: I2cc3c93b9812797bd67f64a8728569491eeec668 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/downloadarchivesjob.cpp')
-rw-r--r--src/libs/installer/downloadarchivesjob.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/libs/installer/downloadarchivesjob.cpp b/src/libs/installer/downloadarchivesjob.cpp
index 8d619267b..c3cfb4abd 100644
--- a/src/libs/installer/downloadarchivesjob.cpp
+++ b/src/libs/installer/downloadarchivesjob.cpp
@@ -126,8 +126,8 @@ void DownloadArchivesJob::fetchNextArchiveHash()
return;
}
- connect(m_downloader, SIGNAL(downloadCompleted()), this, SLOT(finishedHashDownload()),
- Qt::QueuedConnection);
+ connect(m_downloader, &FileDownloader::downloadCompleted,
+ this, &DownloadArchivesJob::finishedHashDownload, Qt::QueuedConnection);
m_downloader->download();
} else {
QMetaObject::invokeMethod(this, "fetchNextArchive", Qt::QueuedConnection);
@@ -174,7 +174,8 @@ void DownloadArchivesJob::fetchNextArchive()
emit progressChanged(double(m_archivesDownloaded) / m_archivesToDownloadCount);
connect(m_downloader, SIGNAL(downloadProgress(double)), this, SLOT(emitDownloadProgress(double)));
- connect(m_downloader, SIGNAL(downloadCompleted()), this, SLOT(registerFile()), Qt::QueuedConnection);
+ connect(m_downloader, &FileDownloader::downloadCompleted,
+ this, &DownloadArchivesJob::registerFile, Qt::QueuedConnection);
m_downloader->download();
}
@@ -292,10 +293,10 @@ KDUpdater::FileDownloader *DownloadArchivesJob::setupDownloader(const QString &s
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)),
+ connect(downloader, &FileDownloader::downloadCanceled, this, &DownloadArchivesJob::downloadCanceled);
+ connect(downloader, &FileDownloader::downloadAborted, this, &DownloadArchivesJob::downloadFailed,
Qt::QueuedConnection);
- connect(downloader, SIGNAL(downloadStatus(QString)), this, SIGNAL(downloadStatusChanged(QString)));
+ connect(downloader, &FileDownloader::downloadStatus, this, &DownloadArchivesJob::downloadStatusChanged);
if (FileDownloaderFactory::isSupportedScheme(scheme)) {
downloader->setDownloadedFileName(component->localTempPath() + QLatin1Char('/')