diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-10-02 23:35:45 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-10-02 23:35:45 +0200 |
commit | eba9b3d759dbf6e402e91ab897059f1d274aef90 (patch) | |
tree | c60b47ce006a590806d69b397a219bb57aa40b3e /logic/lists | |
parent | 48bd3add29e3e4a8e65fc28925141ea4fef2b8b4 (diff) | |
download | MultiMC-eba9b3d759dbf6e402e91ab897059f1d274aef90.tar MultiMC-eba9b3d759dbf6e402e91ab897059f1d274aef90.tar.gz MultiMC-eba9b3d759dbf6e402e91ab897059f1d274aef90.tar.lz MultiMC-eba9b3d759dbf6e402e91ab897059f1d274aef90.tar.xz MultiMC-eba9b3d759dbf6e402e91ab897059f1d274aef90.zip |
Add user agent header to most MultiMC download requests.
Diffstat (limited to 'logic/lists')
-rw-r--r-- | logic/lists/ForgeVersionList.cpp | 14 | ||||
-rw-r--r-- | logic/lists/ForgeVersionList.h | 1 |
2 files changed, 14 insertions, 1 deletions
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; diff --git a/logic/lists/ForgeVersionList.h b/logic/lists/ForgeVersionList.h index 613de8a6..4abfe9ce 100644 --- a/logic/lists/ForgeVersionList.h +++ b/logic/lists/ForgeVersionList.h @@ -101,6 +101,7 @@ public: protected slots: void list_downloaded(); + void list_failed(); protected: DownloadJobPtr listJob; |