mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Fix Qt 5.2 build.
This commit is contained in:
@@ -126,7 +126,7 @@ bool Server::setupHttps(const QByteArray &certificates, const QByteArray &key)
|
|||||||
{
|
{
|
||||||
QSslKey sslKey(key, QSsl::Rsa);
|
QSslKey sslKey(key, QSsl::Rsa);
|
||||||
if (sslKey.isNull())
|
if (sslKey.isNull())
|
||||||
#ifdef QBT_USES_QT5
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
|
||||||
sslKey = QSslKey(key, QSsl::Ec);
|
sslKey = QSslKey(key, QSsl::Ec);
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -432,7 +432,7 @@ QStringMap AbstractWebApplication::parseCookie(const Http::Request &request) con
|
|||||||
// [rfc6265] 4.2.1. Syntax
|
// [rfc6265] 4.2.1. Syntax
|
||||||
QStringMap ret;
|
QStringMap ret;
|
||||||
const QString cookieStr = request.headers.value(QLatin1String("cookie"));
|
const QString cookieStr = request.headers.value(QLatin1String("cookie"));
|
||||||
#ifdef QBT_USES_QT5
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
||||||
const QVector<QStringRef> cookies = cookieStr.splitRef(';', QString::SkipEmptyParts);
|
const QVector<QStringRef> cookies = cookieStr.splitRef(';', QString::SkipEmptyParts);
|
||||||
#else
|
#else
|
||||||
const QStringList cookies = cookieStr.split(';', QString::SkipEmptyParts);
|
const QStringList cookies = cookieStr.split(';', QString::SkipEmptyParts);
|
||||||
@@ -442,7 +442,7 @@ QStringMap AbstractWebApplication::parseCookie(const Http::Request &request) con
|
|||||||
const int idx = cookie.indexOf('=');
|
const int idx = cookie.indexOf('=');
|
||||||
if (idx < 0)
|
if (idx < 0)
|
||||||
continue;
|
continue;
|
||||||
#ifdef QBT_USES_QT5
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
||||||
const QString name = cookie.left(idx).trimmed().toString();
|
const QString name = cookie.left(idx).trimmed().toString();
|
||||||
const QString value = Utils::String::unquote(cookie.mid(idx + 1).trimmed())
|
const QString value = Utils::String::unquote(cookie.mid(idx + 1).trimmed())
|
||||||
.toString();
|
.toString();
|
||||||
|
|||||||
Reference in New Issue
Block a user