Commit 927fb4c7 authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlProfiler: Fix taking using address of profile



Fix gcc error: taking address of temporary

Change-Id: I24e9be4a5e351f61b151a502bb3ca3d52473f41d
Reviewed-by: default avatarChristiaan Janssen <christiaan.janssen@nokia.com>
parent b10a5aa5
......@@ -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];
......
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