Commit 995cb365 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

QmlProfiler: Avoid repetitive calls



Change-Id: Iaf84cccf864b3975e6f6fe282a97fb5ea70e7a93
Reviewed-by: default avatarUlf Hermann <ulf.hermann@digia.com>
parent f470db1e
......@@ -469,11 +469,12 @@ void QV8ProfilerEventsMainView::QV8ProfilerEventsMainViewPrivate::buildV8ModelFr
item->setEditable(false);
// metadata
newRow.at(0)->setData(QString::fromLatin1("%1:%2").arg(v8event->filename, QString::number(v8event->line)), EventHashStrRole);
newRow.at(0)->setData(QVariant(v8event->filename), FilenameRole);
newRow.at(0)->setData(QVariant(v8event->line), LineRole);
newRow.at(0)->setData(QVariant(-1),ColumnRole); // v8 events have no column info
newRow.at(0)->setData(QVariant(v8event->eventId), EventIdRole);
QStandardItem *firstItem = newRow.at(0);
firstItem->setData(QString::fromLatin1("%1:%2").arg(v8event->filename, QString::number(v8event->line)), EventHashStrRole);
firstItem->setData(QVariant(v8event->filename), FilenameRole);
firstItem->setData(QVariant(v8event->line), LineRole);
firstItem->setData(QVariant(-1),ColumnRole); // v8 events have no column info
firstItem->setData(QVariant(v8event->eventId), EventIdRole);
// append
m_model->invisibleRootItem()->appendRow(newRow);
......
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