forked from qt-creator/qt-creator
QmlProfiler: Add default argument for parent widgets on event views
Change-Id: Id67e87920a09ff2f5f5bbf73327f2cac6b299973 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
namespace QmlProfiler {
|
namespace QmlProfiler {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
FlameGraphView::FlameGraphView(QWidget *parent, QmlProfilerModelManager *manager) :
|
FlameGraphView::FlameGraphView(QmlProfilerModelManager *manager, QWidget *parent) :
|
||||||
QmlProfilerEventsView(parent), m_content(new QQuickWidget(this)),
|
QmlProfilerEventsView(parent), m_content(new QQuickWidget(this)),
|
||||||
m_model(new FlameGraphModel(manager, this))
|
m_model(new FlameGraphModel(manager, this))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class FlameGraphView : public QmlProfilerEventsView
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
FlameGraphView(QWidget *parent, QmlProfilerModelManager *manager);
|
FlameGraphView(QmlProfilerModelManager *manager, QWidget *parent = nullptr);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void selectByTypeId(int typeIndex) override;
|
void selectByTypeId(int typeIndex) override;
|
||||||
|
|||||||
@@ -173,8 +173,8 @@ static void getSourceLocation(QStandardItem *infoItem,
|
|||||||
receiver(fileName, line, column);
|
receiver(fileName, line, column);
|
||||||
}
|
}
|
||||||
|
|
||||||
QmlProfilerStatisticsView::QmlProfilerStatisticsView(QWidget *parent,
|
QmlProfilerStatisticsView::QmlProfilerStatisticsView(QmlProfilerModelManager *profilerModelManager,
|
||||||
QmlProfilerModelManager *profilerModelManager)
|
QWidget *parent)
|
||||||
: QmlProfilerEventsView(parent), d(new QmlProfilerStatisticsViewPrivate(this))
|
: QmlProfilerEventsView(parent), d(new QmlProfilerStatisticsViewPrivate(this))
|
||||||
{
|
{
|
||||||
setObjectName(QLatin1String("QmlProfilerStatisticsView"));
|
setObjectName(QLatin1String("QmlProfilerStatisticsView"));
|
||||||
|
|||||||
@@ -75,8 +75,8 @@ class QmlProfilerStatisticsView : public QmlProfilerEventsView
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit QmlProfilerStatisticsView(QWidget *parent,
|
explicit QmlProfilerStatisticsView(QmlProfilerModelManager *profilerModelManager,
|
||||||
QmlProfilerModelManager *profilerModelManager);
|
QWidget *parent = nullptr);
|
||||||
~QmlProfilerStatisticsView();
|
~QmlProfilerStatisticsView();
|
||||||
void clear() override;
|
void clear() override;
|
||||||
|
|
||||||
|
|||||||
@@ -94,8 +94,8 @@ void QmlProfilerViewManager::createViews()
|
|||||||
perspective->addOperation({Constants::QmlProfilerTimelineDockId, d->traceView, {},
|
perspective->addOperation({Constants::QmlProfilerTimelineDockId, d->traceView, {},
|
||||||
Perspective::SplitVertical});
|
Perspective::SplitVertical});
|
||||||
|
|
||||||
d->eventsViews << new QmlProfilerStatisticsView(0, d->profilerModelManager);
|
d->eventsViews << new QmlProfilerStatisticsView(d->profilerModelManager);
|
||||||
d->eventsViews << new FlameGraphView(0, d->profilerModelManager);
|
d->eventsViews << new FlameGraphView(d->profilerModelManager);
|
||||||
|
|
||||||
foreach (QmlProfilerEventsView *view, d->eventsViews) {
|
foreach (QmlProfilerEventsView *view, d->eventsViews) {
|
||||||
connect(view, &QmlProfilerEventsView::typeSelected,
|
connect(view, &QmlProfilerEventsView::typeSelected,
|
||||||
|
|||||||
Reference in New Issue
Block a user