37 QNetworkRequest request;
70 const QVariant &redirection =
m_reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
71 if(
m_reply->error() != QNetworkReply::NoError)
75 else if(redirection.isValid())
79 m_file->open(QIODevice::WriteOnly);
void downloadSpeedLabelChanged(const QString &speed, qint64 timeLeft)
void downloadProgressChanged(float percent, const QString &total, qint64 time)
MusicDownloadDataRequest(const QString &url, const QString &path, TTK::Download type, QObject *parent=nullptr)
void downLoadDataChanged(const QString &bytes)
QString mapCurrentQueryData() const
#define G_DOWNLOAD_MANAGER_PTR
The class of the abstract download data.
void createDownloadItem(const QString &name, qint64 time)
static qint64 currentTimestamp() noexcept
The class of the download the type of data.
TTK_MODULE_EXPORT void setSslConfiguration(QNetworkRequest *request, QSslSocket::PeerVerifyMode mode=QSslSocket::VerifyNone)
TTK_MODULE_EXPORT QString sizeByteToLabel(qint64 size)
virtual void downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
virtual void updateDownloadSpeed() overridefinal
TTK_MODULE_EXPORT QString speedByteToLabel(qint64 size)
#define TTK_INFO_STREAM(msg)
The namespace of the process utils.
virtual void downloadProgress(qint64 bytesReceived, qint64 bytesTotal) overridefinal
QNetworkAccessManager m_manager
virtual void replyError(QNetworkReply::NetworkError error) override
The class of the download manager pair.
TTK::Download m_downloadType
virtual void updateDownloadSpeed()
virtual void downLoadFinished() override
TTK_MODULE_EXPORT void makeContentTypeHeader(QNetworkRequest *request, const QByteArray &data={})
virtual void deleteAll() overridefinal
virtual void downLoadFinished() override
#define TTK_ERROR_STREAM(msg)
virtual void startToRequest() override
#define QtNetworkErrorConnect(p, q, f, s)
Network error connect.