Tracing: Handle mouse events in FlameGraph QQuickItem

Having an additional MouseArea as child of a ScrollView or a Flickable
is not well defined and leads to inconsistent behavior on different
systems. We can easily catch the relevant events in the FlameGraph item
itself. Also, don't redirect the typeSelected() signals through the
model. They don't belong there.

Change-Id: I77c17977b5a51d57ccd2ef880d3d6c6a604b7f78
Task-number: QTCREATORBUG-20573
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ulf Hermann
2018-06-06 19:23:15 +02:00
parent b16ba2ba59
commit 5f9f8f9f16
11 changed files with 336 additions and 29 deletions

View File

@@ -67,7 +67,7 @@ FlameGraphView::FlameGraphView(QmlProfilerModelManager *manager, QWidget *parent
layout->addWidget(m_content);
setLayout(layout);
connect(m_model, &FlameGraphModel::typeSelected, this, &FlameGraphView::typeSelected);
connect(m_content->rootObject(), SIGNAL(typeSelected(int)), this, SIGNAL(typeSelected(int)));
connect(m_model, &FlameGraphModel::gotoSourceLocation,
this, &FlameGraphView::gotoSourceLocation);
}