QmlProfiler: Fix taking using address of profile

Fix gcc error: taking address of temporary

Change-Id: I24e9be4a5e351f61b151a502bb3ca3d52473f41d
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
Kai Koehne
2012-01-23 10:00:29 +01:00
parent b10a5aa52a
commit 927fb4c7c9

View File

@@ -174,9 +174,10 @@ void QmlProfilerDetailsRewriter::documentReady(QmlJS::Document::Ptr doc)
if (!d->m_pendingDocs.contains(doc->fileName()))
return;
// if the file could not be opened this slot is still triggered but source() will be an empty string
if (!doc->source().isEmpty()) {
QTextStream st(&doc->source(), QIODevice::ReadOnly);
// if the file could not be opened this slot is still triggered but source will be an empty string
QString source = doc->source();
if (!source.isEmpty()) {
QTextStream st(&source, QIODevice::ReadOnly);
for (int i = d->m_pendingEvents.count()-1; i>=0; i--) {
PendingEvent ev = d->m_pendingEvents[i];