From 3535f46374ccf8ad966e4b266c0dbd919646fded Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Wed, 21 Sep 2022 16:54:22 +0200 Subject: [PATCH] QSysInfo: remove unneeded assert Change-Id: I850aeb2acf569c42fd15df860d9724d8e7e236ee Reviewed-by: Thiago Macieira --- src/corelib/global/qsysinfo.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/corelib/global/qsysinfo.cpp b/src/corelib/global/qsysinfo.cpp index 55e0fa0688..6e9f8a0eea 100644 --- a/src/corelib/global/qsysinfo.cpp +++ b/src/corelib/global/qsysinfo.cpp @@ -232,10 +232,8 @@ static QString unquote(const char *begin, const char *end) // All strings should be in UTF-8 format, and non-printable // characters should not be used. It is not supported to // concatenate multiple individually quoted strings. - if (*begin == '"') { - Q_ASSERT(end[-1] == '"'); + if (*begin == '"') return QString::fromUtf8(begin + 1, end - begin - 2); - } return QString::fromUtf8(begin, end - begin); } static QByteArray getEtcFileContent(const char *filename)