mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-25 18:56:34 +03:00
Fix autoupdater. Send our user-agent to sourceforge.net
Conflicts: src/programupdater.cpp
This commit is contained in:
parent
71e5c9e17b
commit
4376e81f78
1 changed files with 5 additions and 3 deletions
|
@ -40,10 +40,10 @@
|
|||
#include "preferences.h"
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
const QString RSS_URL = "http://sourceforge.net/api/file/index/project-id/163414/mtime/desc/rss?path=/qbittorrent-mac";
|
||||
const QUrl RSS_URL("http://sourceforge.net/api/file/index/project-id/163414/mtime/desc/rss?path=/qbittorrent-mac");
|
||||
const QString FILE_EXT = "DMG";
|
||||
#else
|
||||
const QString RSS_URL = "http://sourceforge.net/api/file/index/project-id/163414/mtime/desc/rss?path=/qbittorrent-win32";
|
||||
const QUrl RSS_URL("http://sourceforge.net/api/file/index/project-id/163414/mtime/desc/rss?path=/qbittorrent-win32");
|
||||
const QString FILE_EXT = "EXE";
|
||||
#endif
|
||||
|
||||
|
@ -87,7 +87,9 @@ void ProgramUpdater::checkForUpdates()
|
|||
connect(mp_manager, SIGNAL(finished(QNetworkReply*)),
|
||||
this, SLOT(rssDownloadFinished(QNetworkReply*)));
|
||||
// Send the request
|
||||
mp_manager->get(QNetworkRequest(QUrl(RSS_URL)));
|
||||
QNetworkRequest request(RSS_URL);
|
||||
request.setRawHeader("User-Agent", QString("qBittorrent/%1 ProgramUpdater (www.qbittorrent.org)").arg(VERSION).toLocal8Bit());
|
||||
mp_manager->get(request);
|
||||
}
|
||||
|
||||
void ProgramUpdater::setUpdateUrl(QString title) {
|
||||
|
|
Loading…
Reference in a new issue