From d527cc8d5a072535b915c93add2e6f11cf50596e Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 31 May 2016 17:31:45 +0200 Subject: [PATCH] QmlProfiler: Add default argument for parent widgets on event views Change-Id: Id67e87920a09ff2f5f5bbf73327f2cac6b299973 Reviewed-by: Christian Kandeler --- src/plugins/qmlprofiler/flamegraphview.cpp | 2 +- src/plugins/qmlprofiler/flamegraphview.h | 2 +- src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp | 4 ++-- src/plugins/qmlprofiler/qmlprofilerstatisticsview.h | 4 ++-- src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/plugins/qmlprofiler/flamegraphview.cpp b/src/plugins/qmlprofiler/flamegraphview.cpp index f461b4332d9..7414559b298 100644 --- a/src/plugins/qmlprofiler/flamegraphview.cpp +++ b/src/plugins/qmlprofiler/flamegraphview.cpp @@ -35,7 +35,7 @@ namespace QmlProfiler { namespace Internal { -FlameGraphView::FlameGraphView(QWidget *parent, QmlProfilerModelManager *manager) : +FlameGraphView::FlameGraphView(QmlProfilerModelManager *manager, QWidget *parent) : QmlProfilerEventsView(parent), m_content(new QQuickWidget(this)), m_model(new FlameGraphModel(manager, this)) { diff --git a/src/plugins/qmlprofiler/flamegraphview.h b/src/plugins/qmlprofiler/flamegraphview.h index 02b92723eda..60c817584ea 100644 --- a/src/plugins/qmlprofiler/flamegraphview.h +++ b/src/plugins/qmlprofiler/flamegraphview.h @@ -38,7 +38,7 @@ class FlameGraphView : public QmlProfilerEventsView { Q_OBJECT public: - FlameGraphView(QWidget *parent, QmlProfilerModelManager *manager); + FlameGraphView(QmlProfilerModelManager *manager, QWidget *parent = nullptr); public slots: void selectByTypeId(int typeIndex) override; diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp index bca2a6bcbcc..00ea7d99002 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp @@ -173,8 +173,8 @@ static void getSourceLocation(QStandardItem *infoItem, receiver(fileName, line, column); } -QmlProfilerStatisticsView::QmlProfilerStatisticsView(QWidget *parent, - QmlProfilerModelManager *profilerModelManager) +QmlProfilerStatisticsView::QmlProfilerStatisticsView(QmlProfilerModelManager *profilerModelManager, + QWidget *parent) : QmlProfilerEventsView(parent), d(new QmlProfilerStatisticsViewPrivate(this)) { setObjectName(QLatin1String("QmlProfilerStatisticsView")); diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.h b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.h index 9b5a693b8c1..4712246affd 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.h +++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.h @@ -75,8 +75,8 @@ class QmlProfilerStatisticsView : public QmlProfilerEventsView { Q_OBJECT public: - explicit QmlProfilerStatisticsView(QWidget *parent, - QmlProfilerModelManager *profilerModelManager); + explicit QmlProfilerStatisticsView(QmlProfilerModelManager *profilerModelManager, + QWidget *parent = nullptr); ~QmlProfilerStatisticsView(); void clear() override; diff --git a/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp b/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp index a9535db655d..af6523ab77a 100644 --- a/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp @@ -94,8 +94,8 @@ void QmlProfilerViewManager::createViews() perspective->addOperation({Constants::QmlProfilerTimelineDockId, d->traceView, {}, Perspective::SplitVertical}); - d->eventsViews << new QmlProfilerStatisticsView(0, d->profilerModelManager); - d->eventsViews << new FlameGraphView(0, d->profilerModelManager); + d->eventsViews << new QmlProfilerStatisticsView(d->profilerModelManager); + d->eventsViews << new FlameGraphView(d->profilerModelManager); foreach (QmlProfilerEventsView *view, d->eventsViews) { connect(view, &QmlProfilerEventsView::typeSelected,