mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07:00
Fix compilation with Qt 4.4
This commit is contained in:
parent
c8f5cab636
commit
5494c33a89
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue