diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-04-19 18:18:03 +0200 |
---|---|---|
committer | con <qtc-committer@nokia.com> | 2010-04-19 18:56:01 +0200 |
commit | 04a5b9137ad790971691a29b6ab727d0246115bf (patch) | |
tree | b660396ba4d8d32e2f52bd0adec8361be9bddedd | |
parent | 8e3c9fa10df728fa4da72e63c0ce577bd4674be1 (diff) | |
download | qt-creator-04a5b9137ad790971691a29b6ab727d0246115bf.tar.gz |
don't use fromRawData() for the file name parts.
the sub-strings "escaped" from the evaluator through the accessor, so
things did go boom, after all.
Reviewed-by: thorbjorn
(cherry picked from commit 2113669fba0956c78f3cbd63ca7c201daefaa8d9)
-rw-r--r-- | src/shared/proparser/proitems.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/shared/proparser/proitems.cpp b/src/shared/proparser/proitems.cpp index 9916ebae9d..6b9d35ee41 100644 --- a/src/shared/proparser/proitems.cpp +++ b/src/shared/proparser/proitems.cpp @@ -61,11 +61,10 @@ ProFile::ProFile(const QString &fileName) setBlockKind(ProBlock::ProFileKind); m_fileName = fileName; - // If the full name does not outlive the parts, things will go boom ... int nameOff = fileName.lastIndexOf(QLatin1Char('/')); - m_displayFileName = QString::fromRawData(fileName.constData() + nameOff + 1, - fileName.length() - nameOff - 1); - m_directoryName = QString::fromRawData(fileName.constData(), nameOff); + m_displayFileName = QString(fileName.constData() + nameOff + 1, + fileName.length() - nameOff - 1); + m_directoryName = QString(fileName.constData(), nameOff); } QT_END_NAMESPACE |