From 3e75c2965c96fa014ab74121e84d623fd04a27f7 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 10 Jun 2019 00:09:10 +0200 Subject: Remove QLatin1Literal usages That's an undocumented Qt 4/3/2 remnant, start remove usages. Fix incorrect include header in qclass_lib_map.h as a drive-by. Change-Id: I939be2621bc03e5c75f7e3f152546d3af6d37b91 Reviewed-by: Marc Mutz Reviewed-by: Thiago Macieira --- src/testlib/qtaptestlogger.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/testlib') diff --git a/src/testlib/qtaptestlogger.cpp b/src/testlib/qtaptestlogger.cpp index 540b36e273..476761e602 100644 --- a/src/testlib/qtaptestlogger.cpp +++ b/src/testlib/qtaptestlogger.cpp @@ -154,10 +154,10 @@ void QTapTestLogger::addIncident(IncidentTypes type, const char *description, // This is fragile, but unfortunately testlib doesn't plumb // the expected and actual values to the loggers (yet). static QRegularExpression verifyRegex( - QLatin1Literal("^'(?.*)' returned (?\\w+).+\\((?.*)\\)$")); + QLatin1String("^'(?.*)' returned (?\\w+).+\\((?.*)\\)$")); static QRegularExpression comparRegex( - QLatin1Literal("^(?.*)\n" + QLatin1String("^(?.*)\n" "\\s*Actual\\s+\\((?.*)\\)\\s*: (?.*)\n" "\\s*Expected\\s+\\((?.*)\\)\\s*: (?.*)$")); @@ -168,22 +168,22 @@ void QTapTestLogger::addIncident(IncidentTypes type, const char *description, if (match.hasMatch()) { bool isVerify = match.regularExpression() == verifyRegex; - QString message = match.captured(QLatin1Literal("message")); + QString message = match.captured(QLatin1String("message")); QString expected; QString actual; if (isVerify) { - QString expression = QLatin1Literal(" (") - % match.captured(QLatin1Literal("actualexpression")) % QLatin1Char(')') ; - actual = match.captured(QLatin1Literal("actual")).toLower() % expression; - expected = (actual.startsWith(QLatin1Literal("true")) ? QLatin1Literal("false") : QLatin1Literal("true")) % expression; + QString expression = QLatin1String(" (") + % match.captured(QLatin1String("actualexpression")) % QLatin1Char(')') ; + actual = match.captured(QLatin1String("actual")).toLower() % expression; + expected = (actual.startsWith(QLatin1String("true")) ? QLatin1String("false") : QLatin1String("true")) % expression; if (message.isEmpty()) - message = QLatin1Literal("Verification failed"); + message = QLatin1String("Verification failed"); } else { - expected = match.captured(QLatin1Literal("expected")) - % QLatin1Literal(" (") % match.captured(QLatin1Literal("expectedexpresssion")) % QLatin1Char(')'); - actual = match.captured(QLatin1Literal("actual")) - % QLatin1Literal(" (") % match.captured(QLatin1Literal("actualexpression")) % QLatin1Char(')'); + expected = match.captured(QLatin1String("expected")) + % QLatin1String(" (") % match.captured(QLatin1String("expectedexpresssion")) % QLatin1Char(')'); + actual = match.captured(QLatin1String("actual")) + % QLatin1String(" (") % match.captured(QLatin1String("actualexpression")) % QLatin1Char(')'); } QTestCharBuffer diagnosticsYamlish; -- cgit v1.2.3