mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-15 01:00:17 +00:00
Follow http user-agent format
Add version variable without the starting "v"
This commit is contained in:
parent
cb1646be32
commit
2091dfaa69
@ -17,15 +17,17 @@ endif()
|
|||||||
|
|
||||||
set(PROJECT_VERSION "${PROJECT_VERSION}${VER_STATUS}")
|
set(PROJECT_VERSION "${PROJECT_VERSION}${VER_STATUS}")
|
||||||
|
|
||||||
add_definitions(-DVERSION_MAJOR=${VER_MAJOR})
|
add_definitions(-DQBT_VERSION_MAJOR=${VER_MAJOR})
|
||||||
add_definitions(-DVERSION_MINOR=${VER_MINOR})
|
add_definitions(-DQBT_VERSION_MINOR=${VER_MINOR})
|
||||||
add_definitions(-DVERSION_BUGFIX=${VER_BUGFIX})
|
add_definitions(-DQBT_VERSION_BUGFIX=${VER_BUGFIX})
|
||||||
add_definitions(-DVERSION_BUILD=${VER_BUILD})
|
add_definitions(-DQBT_VERSION_BUILD=${VER_BUILD})
|
||||||
|
|
||||||
# os2 {
|
# os2 {
|
||||||
# DEFINES += VERSION=\'\"v$${PROJECT_VERSION}\"\'
|
# DEFINES += DQBT_VERSION=\'\"v$${PROJECT_VERSION}\"\'
|
||||||
|
# DEFINES += DQBT_VERSION_2=\'\"$${PROJECT_VERSION}\"\'
|
||||||
# } else {
|
# } else {
|
||||||
add_definitions(-DVERSION="v${PROJECT_VERSION}")
|
add_definitions(-DQBT_VERSION="v${PROJECT_VERSION}")
|
||||||
|
add_definitions(-DQBT_VERSION_2="${PROJECT_VERSION}")
|
||||||
# }
|
# }
|
||||||
|
|
||||||
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og")
|
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og")
|
||||||
|
@ -91,7 +91,7 @@
|
|||||||
|
|
||||||
static const char PEER_ID[] = "qB";
|
static const char PEER_ID[] = "qB";
|
||||||
static const char RESUME_FOLDER[] = "BT_backup";
|
static const char RESUME_FOLDER[] = "BT_backup";
|
||||||
static const char USER_AGENT[] = "qBittorrent " VERSION;
|
static const char USER_AGENT[] = "qBittorrent/" QBT_VERSION; // to pass trackers whitelists, using the "v" prefixed version string
|
||||||
|
|
||||||
namespace libt = libtorrent;
|
namespace libt = libtorrent;
|
||||||
using namespace BitTorrent;
|
using namespace BitTorrent;
|
||||||
|
@ -78,7 +78,7 @@ void DNSUpdater::checkPublicIP()
|
|||||||
|
|
||||||
DownloadHandler *handler = DownloadManager::instance()->downloadUrl(
|
DownloadHandler *handler = DownloadManager::instance()->downloadUrl(
|
||||||
"http://checkip.dyndns.org", false, 0, false,
|
"http://checkip.dyndns.org", false, 0, false,
|
||||||
"qBittorrent/" QBT_VERSION);
|
"qBittorrent/" QBT_VERSION_2);
|
||||||
connect(handler, SIGNAL(downloadFinished(QString, QByteArray)), SLOT(ipRequestFinished(QString, QByteArray)));
|
connect(handler, SIGNAL(downloadFinished(QString, QByteArray)), SLOT(ipRequestFinished(QString, QByteArray)));
|
||||||
connect(handler, SIGNAL(downloadFailed(QString, QString)), SLOT(ipRequestFailed(QString, QString)));
|
connect(handler, SIGNAL(downloadFailed(QString, QString)), SLOT(ipRequestFailed(QString, QString)));
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ void DNSUpdater::updateDNSService()
|
|||||||
m_lastIPCheckTime = QDateTime::currentDateTime();
|
m_lastIPCheckTime = QDateTime::currentDateTime();
|
||||||
DownloadHandler *handler = DownloadManager::instance()->downloadUrl(
|
DownloadHandler *handler = DownloadManager::instance()->downloadUrl(
|
||||||
getUpdateUrl(), false, 0, false,
|
getUpdateUrl(), false, 0, false,
|
||||||
"qBittorrent/" QBT_VERSION);
|
"qBittorrent/" QBT_VERSION_2);
|
||||||
connect(handler, SIGNAL(downloadFinished(QString, QByteArray)), SLOT(ipUpdateFinished(QString, QByteArray)));
|
connect(handler, SIGNAL(downloadFinished(QString, QByteArray)), SLOT(ipUpdateFinished(QString, QByteArray)));
|
||||||
connect(handler, SIGNAL(downloadFailed(QString, QString)), SLOT(ipUpdateFailed(QString, QString)));
|
connect(handler, SIGNAL(downloadFailed(QString, QString)), SLOT(ipUpdateFailed(QString, QString)));
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ void ProgramUpdater::checkForUpdates()
|
|||||||
RSS_URL, false, 0, false,
|
RSS_URL, false, 0, false,
|
||||||
// Don't change this User-Agent. In case our updater goes haywire,
|
// Don't change this User-Agent. In case our updater goes haywire,
|
||||||
// the filehost can identify it and contact us.
|
// the filehost can identify it and contact us.
|
||||||
"qBittorrent/" QBT_VERSION " ProgramUpdater (www.qbittorrent.org)");
|
"qBittorrent/" QBT_VERSION_2 " ProgramUpdater (www.qbittorrent.org)");
|
||||||
connect(handler, SIGNAL(downloadFinished(QString,QByteArray)), SLOT(rssDownloadFinished(QString,QByteArray)));
|
connect(handler, SIGNAL(downloadFinished(QString,QByteArray)), SLOT(rssDownloadFinished(QString,QByteArray)));
|
||||||
connect(handler, SIGNAL(downloadFailed(QString,QString)), SLOT(rssDownloadFailed(QString,QString)));
|
connect(handler, SIGNAL(downloadFailed(QString,QString)), SLOT(rssDownloadFailed(QString,QString)));
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,9 @@ DEFINES += QBT_VERSION_BUILD=$${VER_BUILD}
|
|||||||
|
|
||||||
os2 {
|
os2 {
|
||||||
DEFINES += QBT_VERSION=\'\"v$${PROJECT_VERSION}\"\'
|
DEFINES += QBT_VERSION=\'\"v$${PROJECT_VERSION}\"\'
|
||||||
|
DEFINES += QBT_VERSION_2=\'\"$${PROJECT_VERSION}\"\'
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DEFINES += QBT_VERSION=\\\"v$${PROJECT_VERSION}\\\"
|
DEFINES += QBT_VERSION=\\\"v$${PROJECT_VERSION}\\\"
|
||||||
|
DEFINES += QBT_VERSION_2=\\\"$${PROJECT_VERSION}\\\"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user