diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-11-06 20:59:44 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-11-06 20:59:44 +0100 |
commit | 452cc1849fe7e3219d278615aa47d3303dbeb7b7 (patch) | |
tree | f414adff7083ae4ea50a589ad27cbb7ae03f467c /logic/lists/LwjglVersionList.cpp | |
parent | bba4ed5ab2c98c3d60a141d6a089a49716753615 (diff) | |
download | MultiMC-452cc1849fe7e3219d278615aa47d3303dbeb7b7.tar MultiMC-452cc1849fe7e3219d278615aa47d3303dbeb7b7.tar.gz MultiMC-452cc1849fe7e3219d278615aa47d3303dbeb7b7.tar.lz MultiMC-452cc1849fe7e3219d278615aa47d3303dbeb7b7.tar.xz MultiMC-452cc1849fe7e3219d278615aa47d3303dbeb7b7.zip |
Fix Sourceforge lwjgl version index download.
Diffstat (limited to 'logic/lists/LwjglVersionList.cpp')
-rw-r--r-- | logic/lists/LwjglVersionList.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/logic/lists/LwjglVersionList.cpp b/logic/lists/LwjglVersionList.cpp index 3333e86c..df46d7be 100644 --- a/logic/lists/LwjglVersionList.cpp +++ b/logic/lists/LwjglVersionList.cpp @@ -83,7 +83,10 @@ void LWJGLVersionList::loadList() setLoading(true); auto worker = MMC->qnam(); - reply = worker->get(QNetworkRequest(QUrl(RSS_URL))); + QNetworkRequest req(QUrl(RSS_URL)); + req.setRawHeader("Accept", "text/xml"); + req.setRawHeader("User-Agent", "MultiMC/5.0 (Uncached)"); + reply = worker->get(req); connect(reply, SIGNAL(finished()), SLOT(netRequestComplete())); } @@ -127,7 +130,7 @@ void LWJGLVersionList::netRequestComplete() QDomElement linkElement = getDomElementByTagName(items.at(i).toElement(), "link"); if (linkElement.isNull()) { - qWarning() << "Link element" << i << "in RSS feed doesn't exist! Skipping."; + QLOG_INFO() << "Link element" << i << "in RSS feed doesn't exist! Skipping."; continue; } @@ -143,7 +146,7 @@ void LWJGLVersionList::netRequestComplete() QUrl url(link); if (!url.isValid()) { - qWarning() << "LWJGL version URL isn't valid:" << link << "Skipping."; + QLOG_INFO() << "LWJGL version URL isn't valid:" << link << "Skipping."; continue; } @@ -180,7 +183,7 @@ const PtrLWJGLVersion LWJGLVersionList::getVersion(const QString &versionName) void LWJGLVersionList::failed(QString msg) { - qWarning() << msg; + QLOG_INFO() << msg; emit loadListFailed(msg); } |