summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2011-06-09 15:34:16 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2011-06-09 15:34:16 (GMT)
commit292a953258cac0107b820490b09231c0f700bdbe (patch)
treeebcab1e6d4245bc393156053ec4e9c03b2b29b2e /src/corelib/tools
parent628fd7d141013dcda06d13fa644f44029f317a8c (diff)
downloadQt-292a953258cac0107b820490b09231c0f700bdbe.zip
Qt-292a953258cac0107b820490b09231c0f700bdbe.tar.gz
Qt-292a953258cac0107b820490b09231c0f700bdbe.tar.bz2
make the previous change foolproof
in order to preserve the old behavior in a (corner) case where string was created from the raw data with a shorter lifecycle, just call QString's realloc() that will copy the data and thus guarantee it's consistence later. example: QCFString str; { QString qstr("I'm stupid"); str = QCFString(QString::fromRawData(qstr.data(), qstr.size()); } Merge-request: 2615 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qstring.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index c61d09e..bf0a0ad 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -639,6 +639,7 @@ private:
static Data *fromAscii_helper(const char *str, int size = -1);
void replace_helper(uint *indices, int nIndices, int blen, const QChar *after, int alen);
friend class QCharRef;
+ friend class QCFString;
friend class QTextCodec;
friend class QStringRef;
friend struct QAbstractConcatenable;