From 37b0a9c8a37b057d52ade5f393baf8aac692f0d9 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 25 May 2020 10:37:35 +0200 Subject: [PATCH] Fix deprecation warning by not going through QChar mValue is a QByteArray, so no need to expand data to UTF16 just to compare it to a Latin1 character. Change-Id: Ib3c8770867cd5509bb4c2ac5e45aabca577b3bba Reviewed-by: Andrei Golubev Reviewed-by: Edward Welbourne --- src/network/ssl/qasn1element.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/ssl/qasn1element.cpp b/src/network/ssl/qasn1element.cpp index 7d965e6ac9..93bfdfd0fc 100644 --- a/src/network/ssl/qasn1element.cpp +++ b/src/network/ssl/qasn1element.cpp @@ -241,9 +241,9 @@ QDateTime QAsn1Element::toDateTime() const // QDateTime::fromString is lenient and accepts +- signs in front // of the year; but ASN.1 doesn't allow them. - const auto isAsciiDigit = [](QChar c) + const auto isAsciiDigit = [](char c) { - return c >= QLatin1Char('0') && c <= QLatin1Char('9'); + return c >= '0' && c <= '9'; }; if (!isAsciiDigit(mValue[0]))