From 0c0ee82bff31ff2733c5229cf39f678f80b2e7e6 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Wed, 31 Jan 2018 20:26:38 +0300 Subject: QString:: add remove() overload taking QLatin1String [ChangeLog][QtCore][QString] Added remove() overload taking QLatin1String Change-Id: I11ddb8b8603144effe44f89d0d02e131a255122c Reviewed-by: Thiago Macieira --- tests/auto/corelib/tools/qstring/tst_qstring.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/auto/corelib/tools/qstring/tst_qstring.cpp') diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp index 98af7748c5..90cd70f43e 100644 --- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp @@ -2994,6 +2994,12 @@ void tst_QString::remove_string() QString s5 = string; s5.replace( QRegExp(before, cs, QRegExp::FixedString), after ); QTEST( s5, "result" ); + + if (QtPrivate::isLatin1(before)) { + QString s6 = string; + s6.remove( QLatin1String(before.toLatin1()), cs ); + QTEST( s6, "result" ); + } } else { QCOMPARE( 0, 0 ); // shut Qt Test } -- cgit v1.2.3