summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-04-27 14:12:03 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-05-02 20:06:20 +0000
commit2b3782132f71945fcecf090669c9501aca7d727a (patch)
tree56d2ac1e51d3d1f5cfcd640aabbba72f23e3eec3 /src/testlib
parent89225c951e8582a2353ae9d76845e733201f2654 (diff)
QTestLog: simplify construction of a log message
Change-Id: I055efa45ec468cae43a38a9746a47af0382ca8c1 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtestlog.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp
index e87527e57a..bba1a06e04 100644
--- a/src/testlib/qtestlog.cpp
+++ b/src/testlib/qtestlog.cpp
@@ -75,6 +75,8 @@
QT_BEGIN_NAMESPACE
+using namespace Qt::StringLiterals;
+
static void saveCoverageTool(const char * appname, bool testfailed, bool installedTestCoverage)
{
#ifdef __COVERAGESCANNER__
@@ -328,10 +330,11 @@ void QTestLog::printUnhandledIgnoreMessages()
QTest::IgnoreResultList *list = QTest::ignoreResultList;
while (list) {
if (list->pattern.userType() == QMetaType::QString) {
- message = QStringLiteral("Did not receive message: \"") + list->pattern.toString() + u'"';
+ message = "Did not receive message: \"%1\""_L1.arg(list->pattern.toString());
} else {
#if QT_CONFIG(regularexpression)
- message = QStringLiteral("Did not receive any message matching: \"") + list->pattern.toRegularExpression().pattern() + u'"';
+ message = "Did not receive any message matching: \"%1\""_L1.arg(
+ list->pattern.toRegularExpression().pattern());
#endif
}
FOREACH_TEST_LOGGER