summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-08-28 19:23:45 +0200
committerMarc Mutz <marc.mutz@kdab.com>2016-09-18 07:28:56 +0000
commitd58d7a5376ccee53544e5141e442350ba4ad8089 (patch)
tree839b7dc361927ae36c094a62cadb44d279fee538 /tests/auto/corelib/tools
parentc52bb0309071bed9e040c79d87f764bac6a396b8 (diff)
Add QStringList::join(QLatin1String) overload
Costs only ~300B in text size in QtCore, which is roughly compensated by savings in other QtBase libraries, even without specifically porting users to QL1S. Of course, the raison d'ĂȘtre for this overload is avoiding the expensive QLatin1String -> QString conversion which, for small lists, can take up to 50% of the total runtime (assuming memory allocations dominate over scanning and copying the list). [ChangeLog][QtCore][QStringList] Added join(QLatin1String) overload. Change-Id: I91d7e1d4e2c76d6dc79f2b750cf8e256dd4e0ab6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/tools')
-rw-r--r--tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
index 0fdafd9b01..2385aa992c 100644
--- a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
+++ b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
@@ -341,6 +341,7 @@ void tst_QStringList::join() const
QFETCH(QString, expectedResult);
QCOMPARE(input.join(separator), expectedResult);
+ QCOMPARE(input.join(QLatin1String(separator.toLatin1())), expectedResult);
}
void tst_QStringList::join_data() const