aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/qmlprofiler/qmlprofilertraceview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/qmlprofiler/qmlprofilertraceview.cpp')
-rw-r--r--plugins/qmlprofiler/qmlprofilertraceview.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/plugins/qmlprofiler/qmlprofilertraceview.cpp b/plugins/qmlprofiler/qmlprofilertraceview.cpp
index 65a30009ed..c094a07f13 100644
--- a/plugins/qmlprofiler/qmlprofilertraceview.cpp
+++ b/plugins/qmlprofiler/qmlprofilertraceview.cpp
@@ -378,12 +378,25 @@ void QmlProfilerTraceView::clearDisplay()
QMetaObject::invokeMethod(d->m_overview->rootObject(), "clearDisplay");
}
-void QmlProfilerTraceView::selectNextEventWithId(int eventId)
+void QmlProfilerTraceView::selectNextEventByHash(const QString &hash)
{
QGraphicsObject *rootObject = d->m_mainView->rootObject();
+
if (rootObject)
- QMetaObject::invokeMethod(rootObject, "selectNextWithId",
- Q_ARG(QVariant,QVariant(eventId)));
+ QMetaObject::invokeMethod(rootObject, "selectNextByHash",
+ Q_ARG(QVariant,QVariant(hash)));
+}
+
+void QmlProfilerTraceView::selectNextEventByLocation(const QString &filename, const int line, const int column)
+{
+ int eventId = d->m_modelProxy->getEventIdForLocation(filename, line, column);
+
+ if (eventId != -1) {
+ QGraphicsObject *rootObject = d->m_mainView->rootObject();
+ if (rootObject)
+ QMetaObject::invokeMethod(rootObject, "selectNextById",
+ Q_ARG(QVariant,QVariant(eventId)));
+ }
}
/////////////////////////////////////////////////////////