|
|
@ -32,6 +32,7 @@ |
|
|
|
#include <QDesktopServices> |
|
|
|
#include <QDesktopServices> |
|
|
|
#include <QRegularExpression> |
|
|
|
#include <QRegularExpression> |
|
|
|
#include <QStringList> |
|
|
|
#include <QStringList> |
|
|
|
|
|
|
|
#include <QSysInfo> |
|
|
|
#include <QXmlStreamReader> |
|
|
|
#include <QXmlStreamReader> |
|
|
|
|
|
|
|
|
|
|
|
#include "base/net/downloadhandler.h" |
|
|
|
#include "base/net/downloadhandler.h" |
|
|
@ -42,14 +43,6 @@ namespace |
|
|
|
{ |
|
|
|
{ |
|
|
|
const QString RSS_URL {QStringLiteral("https://www.fosshub.com/software/feedqBittorent")}; |
|
|
|
const QString RSS_URL {QStringLiteral("https://www.fosshub.com/software/feedqBittorent")}; |
|
|
|
|
|
|
|
|
|
|
|
#ifdef Q_OS_MAC |
|
|
|
|
|
|
|
const QString OS_TYPE {QStringLiteral("Mac OS X")}; |
|
|
|
|
|
|
|
#elif defined(Q_OS_WIN) && (defined(__x86_64__) || defined(_M_X64)) |
|
|
|
|
|
|
|
const QString OS_TYPE {QStringLiteral("Windows x64")}; |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
const QString OS_TYPE {QStringLiteral("Windows")}; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString getStringValue(QXmlStreamReader &xml); |
|
|
|
QString getStringValue(QXmlStreamReader &xml); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -73,10 +66,17 @@ void ProgramUpdater::checkForUpdates() |
|
|
|
void ProgramUpdater::rssDownloadFinished(const QString &url, const QByteArray &data) |
|
|
|
void ProgramUpdater::rssDownloadFinished(const QString &url, const QByteArray &data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Q_UNUSED(url); |
|
|
|
Q_UNUSED(url); |
|
|
|
|
|
|
|
|
|
|
|
qDebug("Finished downloading the new qBittorrent updates RSS"); |
|
|
|
qDebug("Finished downloading the new qBittorrent updates RSS"); |
|
|
|
QString version; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef Q_OS_MAC |
|
|
|
|
|
|
|
const QString OS_TYPE {"Mac OS X"}; |
|
|
|
|
|
|
|
#elif defined(Q_OS_WIN) |
|
|
|
|
|
|
|
const QString OS_TYPE {((QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) |
|
|
|
|
|
|
|
&& QSysInfo::currentCpuArchitecture().endsWith("64")) |
|
|
|
|
|
|
|
? "Windows x64" : "Windows"}; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString version; |
|
|
|
QXmlStreamReader xml(data); |
|
|
|
QXmlStreamReader xml(data); |
|
|
|
bool inItem = false; |
|
|
|
bool inItem = false; |
|
|
|
QString updateLink; |
|
|
|
QString updateLink; |
|
|
|