mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-06 13:11:25 -07:00
Fix Qt 5.2 build.
This commit is contained in:
parent
ab47559bf2
commit
b4fb193d4a
2 changed files with 3 additions and 3 deletions
|
@ -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();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue