Commit fc14821f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile against qt5.15. SkipEmptyParts is part of Qt::.

parent 88ee7d68
......@@ -144,11 +144,19 @@ void Session::processResponse(const KManageSieve::Response &response, const QByt
m_implementation = QString::fromLatin1(response.value());
qCDebug(KMANAGERSIEVE_LOG) << objectName() << "Connected to Sieve server: " << response.value();
} else if (response.key() == "SASL") {
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
m_saslMethods = QString::fromLatin1(response.value()).split(QLatin1Char(' '), QString::SkipEmptyParts);
#else
m_saslMethods = QString::fromLatin1(response.value()).split(QLatin1Char(' '), Qt::SkipEmptyParts);
#endif
qCDebug(KMANAGERSIEVE_LOG) << objectName() << "Server SASL authentication methods: " << m_saslMethods;
} else if (response.key() == "SIEVE") {
// Save script capabilities
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
m_sieveExtensions = QString::fromLatin1(response.value()).split(QLatin1Char(' '), QString::SkipEmptyParts);
#else
m_sieveExtensions = QString::fromLatin1(response.value()).split(QLatin1Char(' '), Qt::SkipEmptyParts);
#endif
qCDebug(KMANAGERSIEVE_LOG) << objectName() << "Server script capabilities: " << m_sieveExtensions;
} else if (response.key() == "STARTTLS") {
qCDebug(KMANAGERSIEVE_LOG) << objectName() << "Server supports TLS";
......
......@@ -211,19 +211,11 @@ void SessionThread::slotSocketError()
Q_ASSERT(QThread::currentThread() == thread());
qCWarning(KMANAGERSIEVE_LOG) << Q_FUNC_INFO <<
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
m_socket->error()
#else
m_socket->socketError()
#endif
<< m_socket->errorString();
Q_EMIT error(
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
m_socket->error()
#else
m_socket->socketError()
#endif
, m_socket->errorString());
doDisconnectFromHost(false);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment