| 240 | } |
| 241 | |
| 242 | void SelfUpdater::download(const QString& downloadLink) |
| 243 | { |
| 244 | QNetworkAccessManager* accessManager = m_Interface->getAccessManager(); |
| 245 | QUrl dlUrl(downloadLink); |
| 246 | QNetworkRequest request(dlUrl); |
| 247 | m_Canceled = false; |
| 248 | m_Reply = accessManager->get(request); |
| 249 | showProgress(); |
| 250 | |
| 251 | connect(m_Reply, SIGNAL(downloadProgress(qint64, qint64)), this, |
| 252 | SLOT(downloadProgress(qint64, qint64))); |
| 253 | connect(m_Reply, SIGNAL(finished()), this, SLOT(downloadFinished())); |
| 254 | connect(m_Reply, SIGNAL(readyRead()), this, SLOT(downloadReadyRead())); |
| 255 | } |
| 256 | |
| 257 | void SelfUpdater::downloadProgress(qint64 bytesReceived, qint64 bytesTotal) |
| 258 | { |
no test coverage detected