mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
Fix compilation with Qt 4.4
This commit is contained in:
@@ -438,7 +438,7 @@ public:
|
|||||||
|
|
||||||
static QString magnetUriToName(QString magnet_uri) {
|
static QString magnetUriToName(QString magnet_uri) {
|
||||||
QString name = "";
|
QString name = "";
|
||||||
const QRegExp regHex("dn=([^&]+)");
|
QRegExp regHex("dn=([^&]+)");
|
||||||
const int pos = regHex.indexIn(magnet_uri);
|
const int pos = regHex.indexIn(magnet_uri);
|
||||||
if(pos > -1) {
|
if(pos > -1) {
|
||||||
const QString &found = regHex.cap(1);
|
const QString &found = regHex.cap(1);
|
||||||
@@ -450,7 +450,7 @@ public:
|
|||||||
|
|
||||||
static QString magnetUriToHash(QString magnet_uri) {
|
static QString magnetUriToHash(QString magnet_uri) {
|
||||||
QString hash = "";
|
QString hash = "";
|
||||||
const QRegExp regHex("urn:btih:([0-9A-Za-z]+)");
|
QRegExp regHex("urn:btih:([0-9A-Za-z]+)");
|
||||||
// Hex
|
// Hex
|
||||||
int pos = regHex.indexIn(magnet_uri);
|
int pos = regHex.indexIn(magnet_uri);
|
||||||
if(pos > -1) {
|
if(pos > -1) {
|
||||||
@@ -462,7 +462,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Base 32
|
// Base 32
|
||||||
const QRegExp regBase32("urn:btih:([A-Za-z2-7=]+)");
|
QRegExp regBase32("urn:btih:([A-Za-z2-7=]+)");
|
||||||
pos = regBase32.indexIn(magnet_uri);
|
pos = regBase32.indexIn(magnet_uri);
|
||||||
if(pos > -1) {
|
if(pos > -1) {
|
||||||
const QString &found = regBase32.cap(1);
|
const QString &found = regBase32.cap(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user