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

Port to QStringView::split

parent ff70e5ab
Pipeline #77145 canceled with stage
......@@ -343,7 +343,11 @@ bool ServerTestPrivate::handleNntpConversation(MailTransport::Socket *socket, in
// SASL DIGEST-MD5 CRAM-MD5 NTLM PLAIN LOGIN
// STARTTLS
// .
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const QVector<QStringView> lines = QStringView(response).split(QStringLiteral("\r\n"), Qt::SkipEmptyParts);
#else
const QVector<QStringRef> lines = response.splitRef(QStringLiteral("\r\n"), Qt::SkipEmptyParts);
#endif
for (const QStringRef &line : lines) {
if (line.compare(QLatin1String("STARTTLS"), Qt::CaseInsensitive) == 0) {
*shouldStartTLS = true;
......
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