From eba9b3d759dbf6e402e91ab897059f1d274aef90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 2 Oct 2013 23:35:45 +0200 Subject: Add user agent header to most MultiMC download requests. --- logic/lists/ForgeVersionList.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'logic/lists/ForgeVersionList.cpp') diff --git a/logic/lists/ForgeVersionList.cpp b/logic/lists/ForgeVersionList.cpp index e2adbf3b..ac1a4ef5 100644 --- a/logic/lists/ForgeVersionList.cpp +++ b/logic/lists/ForgeVersionList.cpp @@ -165,11 +165,23 @@ void ForgeListLoadTask::executeTask() job->addCacheDownload(QUrl(JSON_URL), forgeListEntry); listJob.reset(job); connect(listJob.data(), SIGNAL(succeeded()), SLOT(list_downloaded())); - connect(listJob.data(), SIGNAL(failed()), SLOT(versionFileFailed())); + connect(listJob.data(), SIGNAL(failed()), SLOT(list_failed())); connect(listJob.data(), SIGNAL(progress(qint64, qint64)), SIGNAL(progress(qint64, qint64))); listJob->start(); } +void ForgeListLoadTask::list_failed() +{ + auto DlJob = listJob->first(); + auto reply = DlJob->m_reply; + if(reply) + { + qDebug() << "Getting forge version list failed: " << reply->errorString(); + } + else + qDebug() << "Getting forge version list failed for reasons unknown."; +} + void ForgeListLoadTask::list_downloaded() { QByteArray data; -- cgit v1.2.3