Commit 40d48f86 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

add documentation for ProString::prepareExtend()



Change-Id: I6b520e8b505a2bfbb1e376fa72be0f140227a3a4
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
(cherry picked from qtbase/f37381e29246b5fc984aaff6cd07731c33b4e0df)
parent e3bee0dc
......@@ -156,6 +156,18 @@ QString &ProString::toQString(QString &tmp) const
return tmp.setRawData(m_string.constData() + m_offset, m_length);
}
/*!
* \brief ProString::prepareExtend
* \param extraLen number of new characters to be added
* \param thisTarget offset to which current contents should be moved
* \param extraTarget offset at which new characters will be added
* \return pointer to storage location for new characters
*
* Prepares the string for adding new characters.
* If the string is detached and has enough space, it will be changed in place.
* Otherwise, it will be replaced with a new string object, thus detaching.
* In either case, the hash will be reset.
*/
QChar *ProString::prepareExtend(int extraLen, int thisTarget, int extraTarget)
{
if (m_string.isDetached() && m_length + extraLen <= m_string.capacity()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment