From e570e7a271e2cc3357b54ba53362597c7c099dd4 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 4 Nov 2014 14:41:32 +0100 Subject: [PATCH] QmlProfiler: Make notes a property of timeline model aggregator Change-Id: I5aa8162d18fad46601198fe71fe87591737c30ff Reviewed-by: Kai Koehne --- src/plugins/qmlprofiler/qmlprofilertraceview.cpp | 3 +++ src/plugins/qmlprofiler/timelinemodelaggregator.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp index ea11b462f8a..a7696dbf649 100644 --- a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp @@ -33,6 +33,7 @@ #include "qmlprofilerstatemanager.h" #include "qmlprofilermodelmanager.h" #include "timelinemodelaggregator.h" +#include "qmlprofilernotesmodel.h" // Needed for the load&save actions in the context menu #include @@ -100,6 +101,8 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, Analyzer::IAnalyzerT groupLayout->setContentsMargins(0, 0, 0, 0); groupLayout->setSpacing(0); + qmlRegisterType(); + d->m_mainView = new QmlProfilerQuickView(this); d->m_mainView->setResizeMode(QQuickView::SizeRootObjectToView); QWidget *mainViewContainer = QWidget::createWindowContainer(d->m_mainView); diff --git a/src/plugins/qmlprofiler/timelinemodelaggregator.h b/src/plugins/qmlprofiler/timelinemodelaggregator.h index b2b7ba9d3a8..59a65a51935 100644 --- a/src/plugins/qmlprofiler/timelinemodelaggregator.h +++ b/src/plugins/qmlprofiler/timelinemodelaggregator.h @@ -42,6 +42,7 @@ class TimelineModelAggregator : public QObject Q_OBJECT Q_PROPERTY(int height READ height NOTIFY heightChanged) Q_PROPERTY(QVariantList models READ models NOTIFY modelsChanged) + Q_PROPERTY(QmlProfiler::QmlProfilerNotesModel *notes READ notes CONSTANT) public: TimelineModelAggregator(QObject *parent = 0); ~TimelineModelAggregator(); @@ -53,7 +54,7 @@ public: QVariantList models() const; int modelIndexFromManagerIndex(int modelManagerIndex) const; - Q_INVOKABLE QmlProfilerNotesModel *notes() const; + QmlProfilerNotesModel *notes() const; Q_INVOKABLE int count(int modelIndex) const; void clear(); Q_INVOKABLE int modelCount() const;