diff options
author | Christiaan Janssen <christiaan.janssen@nokia.com> | 2012-01-12 16:36:40 +0100 |
---|---|---|
committer | Christiaan Janssen <christiaan.janssen@nokia.com> | 2012-01-20 12:18:50 +0100 |
commit | 1958fd82d5821f2af542be904295d87916bbf64f (patch) | |
tree | daa1805d0baae6d9dc66e496e727a6df61d67be6 /src/plugins/qmlprofiler/qmlprofilereventview.cpp | |
parent | 4894c559ac866dade091bd76a8e5749bb11daa53 (diff) | |
download | qt-creator-1958fd82d5821f2af542be904295d87916bbf64f.tar.gz |
QmlProfiler: reading column information in bindings
Change-Id: I1a99c3508de733d98eb99f41419eccfdca030fe0
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilereventview.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilereventview.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilereventview.cpp b/src/plugins/qmlprofiler/qmlprofilereventview.cpp index 491b6b62a8..abd1ab65f6 100644 --- a/src/plugins/qmlprofiler/qmlprofilereventview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilereventview.cpp @@ -86,7 +86,7 @@ QmlProfilerEventsWidget::QmlProfilerEventsWidget(QmlJsDebugClient::QmlProfilerEv m_eventTree = new QmlProfilerEventsMainView(model, this); m_eventTree->setViewType(QmlProfilerEventsMainView::EventsView); - connect(m_eventTree, SIGNAL(gotoSourceLocation(QString,int)), this, SIGNAL(gotoSourceLocation(QString,int))); + connect(m_eventTree, SIGNAL(gotoSourceLocation(QString,int,int)), this, SIGNAL(gotoSourceLocation(QString,int,int))); connect(m_eventTree, SIGNAL(showEventInTimeline(int)), this, SIGNAL(showEventInTimeline(int))); m_eventChildren = new QmlProfilerEventsParentsAndChildrenView(model, QmlProfilerEventsParentsAndChildrenView::ChildrenView, this); @@ -181,8 +181,12 @@ void QmlProfilerEventsWidget::updateSelectedEvent(int eventId) const m_eventTree->selectEvent(eventId); } -void QmlProfilerEventsWidget::selectBySourceLocation(const QString &filename, int line) +void QmlProfilerEventsWidget::selectBySourceLocation(const QString &filename, int line, int column) { + // This slot is used to connect the javascript pane with the qml events pane + // Our javascript trace data does not store column information + // thus we ignore it here + Q_UNUSED(column); m_eventTree->selectEventByLocation(filename, line); } @@ -453,8 +457,9 @@ void QmlProfilerEventsMainView::QmlProfilerEventsMainViewPrivate::buildModelFrom // metadata newRow.at(0)->setData(QVariant(binding->eventHashStr),EventHashStrRole); - newRow.at(0)->setData(QVariant(binding->filename),FilenameRole); - newRow.at(0)->setData(QVariant(binding->line),LineRole); + newRow.at(0)->setData(QVariant(binding->location.filename),FilenameRole); + newRow.at(0)->setData(QVariant(binding->location.line),LineRole); + newRow.at(0)->setData(QVariant(binding->location.column),ColumnRole); newRow.at(0)->setData(QVariant(binding->eventId),EventIdRole); // append @@ -507,6 +512,7 @@ void QmlProfilerEventsMainView::QmlProfilerEventsMainViewPrivate::buildV8ModelFr newRow.at(0)->setData(QString("%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(0),ColumnRole); // v8 events have no column info newRow.at(0)->setData(QVariant(v8event->eventId), EventIdRole); // append @@ -569,9 +575,10 @@ void QmlProfilerEventsMainView::jumpToItem(const QModelIndex &index) // show in editor int line = infoItem->data(LineRole).toInt(); + int column = infoItem->data(ColumnRole).toInt(); QString fileName = infoItem->data(FilenameRole).toString(); if (line!=-1 && !fileName.isEmpty()) - emit gotoSourceLocation(fileName, line); + emit gotoSourceLocation(fileName, line, column); // show in callers/callees subwindow emit eventSelected(infoItem->data(EventIdRole).toInt()); |