mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -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);
|
||||
if (sslKey.isNull())
|
||||
#ifdef QBT_USES_QT5
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
|
||||
sslKey = QSslKey(key, QSsl::Ec);
|
||||
#else
|
||||
{
|
||||
|
||||
@@ -432,7 +432,7 @@ QStringMap AbstractWebApplication::parseCookie(const Http::Request &request) con
|
||||
// [rfc6265] 4.2.1. Syntax
|
||||
QStringMap ret;
|
||||
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);
|
||||
#else
|
||||
const QStringList cookies = cookieStr.split(';', QString::SkipEmptyParts);
|
||||
@@ -442,7 +442,7 @@ QStringMap AbstractWebApplication::parseCookie(const Http::Request &request) con
|
||||
const int idx = cookie.indexOf('=');
|
||||
if (idx < 0)
|
||||
continue;
|
||||
#ifdef QBT_USES_QT5
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
||||
const QString name = cookie.left(idx).trimmed().toString();
|
||||
const QString value = Utils::String::unquote(cookie.mid(idx + 1).trimmed())
|
||||
.toString();
|
||||
|
||||
Reference in New Issue
Block a user