QStringList::join: add an overload taking a single QChar
authorMarc Mutz <marc.mutz@kdab.com>
Fri, 18 May 2012 16:38:25 +0000 (18:38 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 3 Sep 2012 11:41:55 +0000 (13:41 +0200)
commit68e04c3ac148bcbe71f2deeb7288563f6cdbcab5
tree79970daa0b1b7e6393653a5363a6883f4896e66c
parent64a8c78538275b8dbb9d2cbbb1f7b06b247fbe6b
QStringList::join: add an overload taking a single QChar

This overload avoids the needless heap allocation that the traditional
overload incurs due to the implicit QChar -> QString conversion
involved there.

In order to share the implementation between the two overloads,
QStringList_join now takes the separator as a (Char*,int) tuple
instead of as a QString.

Change-Id: I92961f13a3f19099de2a6e2df9f4789a12fc83a0
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/corelib/tools/qstringlist.cpp
src/corelib/tools/qstringlist.h
tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp