summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2019-06-10 00:09:10 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-06-10 16:50:31 +0000
commit3e75c2965c96fa014ab74121e84d623fd04a27f7 (patch)
tree88a8fb5ac641988b791dd9c555a2693fdfd74a50 /src/testlib
parentd7093487a36b0b1a35c28d065f4f0a5890676216 (diff)
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 <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtaptestlogger.cpp24
1 files changed, 12 insertions, 12 deletions
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("^'(?<actualexpression>.*)' returned (?<actual>\\w+).+\\((?<message>.*)\\)$"));
+ QLatin1String("^'(?<actualexpression>.*)' returned (?<actual>\\w+).+\\((?<message>.*)\\)$"));
static QRegularExpression comparRegex(
- QLatin1Literal("^(?<message>.*)\n"
+ QLatin1String("^(?<message>.*)\n"
"\\s*Actual\\s+\\((?<actualexpression>.*)\\)\\s*: (?<actual>.*)\n"
"\\s*Expected\\s+\\((?<expectedexpresssion>.*)\\)\\s*: (?<expected>.*)$"));
@@ -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;