diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2018-03-28 15:40:13 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-04-17 14:11:51 +0000 |
commit | 780d4c6a434c84c7bfdd6b2cf0020891481f7b76 (patch) | |
tree | c47dfeec4f334df2eae8f964de243c30f4f1be23 /src/plugins/qmlprofiler | |
parent | 181ad6671ce9e1de04f79eabb2d8af9cc2c36484 (diff) | |
download | qt-creator-780d4c6a434c84c7bfdd6b2cf0020891481f7b76.tar.gz |
Timeline: Move modelId generation into aggregator
The way the notes model works requires every timeline model to have a
different ID. Conversely no other kind of model actually needs an ID.
Therefore it makes sense to have the TimelineModelAggregator manage the
IDs as every timeline model will sooner or later be associated with an
aggregator.
Change-Id: Ib8b2c88ed883351d4e3e156dd13e1dd113c21808
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler')
35 files changed, 61 insertions, 43 deletions
diff --git a/src/plugins/qmlprofiler/debugmessagesmodel.cpp b/src/plugins/qmlprofiler/debugmessagesmodel.cpp index b0217bf68d..82578df8ec 100644 --- a/src/plugins/qmlprofiler/debugmessagesmodel.cpp +++ b/src/plugins/qmlprofiler/debugmessagesmodel.cpp @@ -30,7 +30,8 @@ namespace QmlProfiler { namespace Internal { -DebugMessagesModel::DebugMessagesModel(QmlProfilerModelManager *manager, QObject *parent) : +DebugMessagesModel::DebugMessagesModel(QmlProfilerModelManager *manager, + Timeline::TimelineModelAggregator *parent) : QmlProfilerTimelineModel(manager, DebugMessage, MaximumRangeType, ProfileDebugMessages, parent), m_maximumMsgType(-1) { diff --git a/src/plugins/qmlprofiler/debugmessagesmodel.h b/src/plugins/qmlprofiler/debugmessagesmodel.h index 4cb49e4e27..6af88796fb 100644 --- a/src/plugins/qmlprofiler/debugmessagesmodel.h +++ b/src/plugins/qmlprofiler/debugmessagesmodel.h @@ -35,7 +35,7 @@ class DebugMessagesModel : public QmlProfilerTimelineModel Q_OBJECT public: - DebugMessagesModel(QmlProfilerModelManager *manager, QObject *parent = 0); + DebugMessagesModel(QmlProfilerModelManager *manager, Timeline::TimelineModelAggregator *parent); int typeId(int index) const override; QRgb color(int index) const override; diff --git a/src/plugins/qmlprofiler/flamegraphmodel.cpp b/src/plugins/qmlprofiler/flamegraphmodel.cpp index 7b2e26d252..41e0b14155 100644 --- a/src/plugins/qmlprofiler/flamegraphmodel.cpp +++ b/src/plugins/qmlprofiler/flamegraphmodel.cpp @@ -57,7 +57,6 @@ FlameGraphModel::FlameGraphModel(QmlProfilerModelManager *modelManager, this, &FlameGraphModel::onTypeDetailsFinished); connect(modelManager->notesModel(), &Timeline::TimelineNotesModel::changed, this, [this](int typeId, int, int){loadNotes(typeId, true);}); - m_modelId = modelManager->registerModelProxy(); m_acceptedFeatures = supportedFeatures(); modelManager->announceFeatures(m_acceptedFeatures, diff --git a/src/plugins/qmlprofiler/inputeventsmodel.cpp b/src/plugins/qmlprofiler/inputeventsmodel.cpp index e89d0ae596..ae8e46f405 100644 --- a/src/plugins/qmlprofiler/inputeventsmodel.cpp +++ b/src/plugins/qmlprofiler/inputeventsmodel.cpp @@ -36,7 +36,8 @@ namespace QmlProfiler { namespace Internal { -InputEventsModel::InputEventsModel(QmlProfilerModelManager *manager, QObject *parent) : +InputEventsModel::InputEventsModel(QmlProfilerModelManager *manager, + Timeline::TimelineModelAggregator *parent) : QmlProfilerTimelineModel(manager, Event, MaximumRangeType, ProfileInputEvents, parent), m_keyTypeId(-1), m_mouseTypeId(-1) { diff --git a/src/plugins/qmlprofiler/inputeventsmodel.h b/src/plugins/qmlprofiler/inputeventsmodel.h index 0e77893a17..d38350777a 100644 --- a/src/plugins/qmlprofiler/inputeventsmodel.h +++ b/src/plugins/qmlprofiler/inputeventsmodel.h @@ -42,7 +42,7 @@ public: int b; }; - InputEventsModel(QmlProfilerModelManager *manager, QObject *parent = 0); + InputEventsModel(QmlProfilerModelManager *manager, Timeline::TimelineModelAggregator *parent); bool accepted(const QmlEventType &type) const override; void loadEvent(const QmlEvent &event, const QmlEventType &type) override; diff --git a/src/plugins/qmlprofiler/memoryusagemodel.cpp b/src/plugins/qmlprofiler/memoryusagemodel.cpp index b379e7455b..5c878a0410 100644 --- a/src/plugins/qmlprofiler/memoryusagemodel.cpp +++ b/src/plugins/qmlprofiler/memoryusagemodel.cpp @@ -32,7 +32,8 @@ namespace QmlProfiler { namespace Internal { -MemoryUsageModel::MemoryUsageModel(QmlProfilerModelManager *manager, QObject *parent) : +MemoryUsageModel::MemoryUsageModel(QmlProfilerModelManager *manager, + Timeline::TimelineModelAggregator *parent) : QmlProfilerTimelineModel(manager, MemoryAllocation, MaximumRangeType, ProfileMemory, parent) { // Announce additional features. The base class already announces the main feature. diff --git a/src/plugins/qmlprofiler/memoryusagemodel.h b/src/plugins/qmlprofiler/memoryusagemodel.h index 98ec40f4d5..65c0d7a528 100644 --- a/src/plugins/qmlprofiler/memoryusagemodel.h +++ b/src/plugins/qmlprofiler/memoryusagemodel.h @@ -51,7 +51,7 @@ public: void update(qint64 amount); }; - MemoryUsageModel(QmlProfilerModelManager *manager, QObject *parent = 0); + MemoryUsageModel(QmlProfilerModelManager *manager, Timeline::TimelineModelAggregator *parent); qint64 rowMaxValue(int rowNumber) const override; diff --git a/src/plugins/qmlprofiler/pixmapcachemodel.cpp b/src/plugins/qmlprofiler/pixmapcachemodel.cpp index 1e47dbe420..b21e2f7cff 100644 --- a/src/plugins/qmlprofiler/pixmapcachemodel.cpp +++ b/src/plugins/qmlprofiler/pixmapcachemodel.cpp @@ -32,7 +32,8 @@ namespace QmlProfiler { namespace Internal { -PixmapCacheModel::PixmapCacheModel(QmlProfilerModelManager *manager, QObject *parent) : +PixmapCacheModel::PixmapCacheModel(QmlProfilerModelManager *manager, + Timeline::TimelineModelAggregator *parent) : QmlProfilerTimelineModel(manager, PixmapCacheEvent, MaximumRangeType, ProfilePixmapCache, parent) { diff --git a/src/plugins/qmlprofiler/pixmapcachemodel.h b/src/plugins/qmlprofiler/pixmapcachemodel.h index c645c53dea..ebd08e131f 100644 --- a/src/plugins/qmlprofiler/pixmapcachemodel.h +++ b/src/plugins/qmlprofiler/pixmapcachemodel.h @@ -94,7 +94,7 @@ public: qint64 cacheSize = 0; }; - PixmapCacheModel(QmlProfilerModelManager *manager, QObject *parent = 0); + PixmapCacheModel(QmlProfilerModelManager *manager, Timeline::TimelineModelAggregator *parent); qint64 rowMaxValue(int rowNumber) const override; diff --git a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp index 337da28fed..f743d2a510 100644 --- a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp @@ -41,7 +41,7 @@ namespace QmlProfiler { namespace Internal { QmlProfilerAnimationsModel::QmlProfilerAnimationsModel(QmlProfilerModelManager *manager, - QObject *parent) : + Timeline::TimelineModelAggregator *parent) : QmlProfilerTimelineModel(manager, Event, MaximumRangeType, ProfileAnimations, parent) { m_minNextStartTimes[0] = m_minNextStartTimes[1] = 0; diff --git a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.h b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.h index 8d10969833..7364db61e3 100644 --- a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.h +++ b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.h @@ -49,7 +49,8 @@ public: int typeId; }; - QmlProfilerAnimationsModel(QmlProfilerModelManager *manager, QObject *parent = 0); + QmlProfilerAnimationsModel(QmlProfilerModelManager *manager, + Timeline::TimelineModelAggregator *parent); qint64 rowMaxValue(int rowNumber) const override; diff --git a/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp b/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp index 7dbb10ba4a..2f5afbd8ac 100644 --- a/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp @@ -76,7 +76,6 @@ public: QmlProfilerModelManager::State state = Empty; - int numRegisteredModels = 0; int numFinishedFinalizers = 0; int numLoadedEvents = 0; @@ -193,11 +192,6 @@ int QmlProfilerModelManager::numEventTypes() const return d->eventTypes.count(); } -int QmlProfilerModelManager::registerModelProxy() -{ - return d->numRegisteredModels++; -} - int QmlProfilerModelManager::numFinishedFinalizers() const { return d->numFinishedFinalizers; diff --git a/src/plugins/qmlprofiler/qmlprofilermodelmanager.h b/src/plugins/qmlprofiler/qmlprofilermodelmanager.h index dd04e841a6..00b525cbf3 100644 --- a/src/plugins/qmlprofiler/qmlprofilermodelmanager.h +++ b/src/plugins/qmlprofiler/qmlprofilermodelmanager.h @@ -76,7 +76,6 @@ public: int numEvents() const; int numEventTypes() const; - int registerModelProxy(); void announceFeatures(quint64 features, EventLoader eventLoader, Finalizer finalizer); int numFinishedFinalizers() const; diff --git a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp index 243e07a0c0..07a5d20e0d 100644 --- a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp @@ -43,7 +43,7 @@ namespace QmlProfiler { namespace Internal { QmlProfilerRangeModel::QmlProfilerRangeModel(QmlProfilerModelManager *manager, RangeType range, - QObject *parent) : + Timeline::TimelineModelAggregator *parent) : QmlProfilerTimelineModel(manager, MaximumMessage, range, featureFromRangeType(range), parent) { m_expandedRowTypes << -1; diff --git a/src/plugins/qmlprofiler/qmlprofilerrangemodel.h b/src/plugins/qmlprofiler/qmlprofilerrangemodel.h index 7e93b67adf..1ca4af7fca 100644 --- a/src/plugins/qmlprofiler/qmlprofilerrangemodel.h +++ b/src/plugins/qmlprofiler/qmlprofilerrangemodel.h @@ -56,7 +56,8 @@ public: int bindingLoopHead; }; - QmlProfilerRangeModel(QmlProfilerModelManager *manager, RangeType range, QObject *parent = 0); + QmlProfilerRangeModel(QmlProfilerModelManager *manager, RangeType range, + Timeline::TimelineModelAggregator *parent); Q_INVOKABLE int expandedRow(int index) const override; Q_INVOKABLE int collapsedRow(int index) const override; diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp index 13b6064eb4..ef8a1ac882 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp @@ -70,7 +70,6 @@ QmlProfilerStatisticsModel::QmlProfilerStatisticsModel(QmlProfilerModelManager * this, &QmlProfilerStatisticsModel::modelManagerStateChanged); connect(modelManager->notesModel(), &Timeline::TimelineNotesModel::changed, this, &QmlProfilerStatisticsModel::notesChanged); - modelManager->registerModelProxy(); m_acceptedTypes << Compiling << Creating << Binding << HandlingSignal << Javascript; diff --git a/src/plugins/qmlprofiler/qmlprofilertimelinemodel.cpp b/src/plugins/qmlprofiler/qmlprofilertimelinemodel.cpp index 2aeb0883ef..8cc9ffc070 100644 --- a/src/plugins/qmlprofiler/qmlprofilertimelinemodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertimelinemodel.cpp @@ -29,9 +29,9 @@ namespace QmlProfiler { QmlProfilerTimelineModel::QmlProfilerTimelineModel(QmlProfilerModelManager *modelManager, Message message, RangeType rangeType, - ProfileFeature mainFeature, QObject *parent) : - TimelineModel(modelManager->registerModelProxy(), parent), - m_message(message), m_rangeType(rangeType), m_mainFeature(mainFeature), + ProfileFeature mainFeature, + Timeline::TimelineModelAggregator *parent) : + TimelineModel(parent), m_message(message), m_rangeType(rangeType), m_mainFeature(mainFeature), m_modelManager(modelManager) { setDisplayName(tr(QmlProfilerModelManager::featureName(mainFeature))); diff --git a/src/plugins/qmlprofiler/qmlprofilertimelinemodel.h b/src/plugins/qmlprofiler/qmlprofilertimelinemodel.h index 742bec73b4..12d2229586 100644 --- a/src/plugins/qmlprofiler/qmlprofilertimelinemodel.h +++ b/src/plugins/qmlprofiler/qmlprofilertimelinemodel.h @@ -28,6 +28,7 @@ #include "qmlprofiler_global.h" #include "qmlprofilermodelmanager.h" #include "timeline/timelinemodel.h" +#include "timeline/timelinemodelaggregator.h" namespace QmlProfiler { @@ -39,7 +40,8 @@ class QMLPROFILER_EXPORT QmlProfilerTimelineModel : public Timeline::TimelineMod public: QmlProfilerTimelineModel(QmlProfilerModelManager *modelManager, Message message, - RangeType rangeType, ProfileFeature mainFeature, QObject *parent); + RangeType rangeType, ProfileFeature mainFeature, + Timeline::TimelineModelAggregator *parent); QmlProfilerModelManager *modelManager() const; diff --git a/src/plugins/qmlprofiler/scenegraphtimelinemodel.cpp b/src/plugins/qmlprofiler/scenegraphtimelinemodel.cpp index 18342e7b6b..ab14fbae11 100644 --- a/src/plugins/qmlprofiler/scenegraphtimelinemodel.cpp +++ b/src/plugins/qmlprofiler/scenegraphtimelinemodel.cpp @@ -76,7 +76,7 @@ Q_STATIC_ASSERT(sizeof(StageLabels) == SceneGraphTimelineModel::MaximumSceneGraphStage * sizeof(const char *)); SceneGraphTimelineModel::SceneGraphTimelineModel(QmlProfilerModelManager *manager, - QObject *parent) : + Timeline::TimelineModelAggregator *parent) : QmlProfilerTimelineModel(manager, SceneGraphFrame, MaximumRangeType, ProfileSceneGraph, parent) { } diff --git a/src/plugins/qmlprofiler/scenegraphtimelinemodel.h b/src/plugins/qmlprofiler/scenegraphtimelinemodel.h index 0dd0e6d510..a4338738aa 100644 --- a/src/plugins/qmlprofiler/scenegraphtimelinemodel.h +++ b/src/plugins/qmlprofiler/scenegraphtimelinemodel.h @@ -82,7 +82,8 @@ public: int glyphCount; // only used for one event type }; - SceneGraphTimelineModel(QmlProfilerModelManager *manager, QObject *parent = 0); + SceneGraphTimelineModel(QmlProfilerModelManager *manager, + Timeline::TimelineModelAggregator *parent); int expandedRow(int index) const override; int collapsedRow(int index) const override; diff --git a/src/plugins/qmlprofiler/tests/debugmessagesmodel_test.cpp b/src/plugins/qmlprofiler/tests/debugmessagesmodel_test.cpp index 85103758a6..71a68ded90 100644 --- a/src/plugins/qmlprofiler/tests/debugmessagesmodel_test.cpp +++ b/src/plugins/qmlprofiler/tests/debugmessagesmodel_test.cpp @@ -33,7 +33,7 @@ namespace QmlProfiler { namespace Internal { DebugMessagesModelTest::DebugMessagesModelTest(QObject *parent) : - QObject(parent), manager(nullptr), model(&manager) + QObject(parent), model(&manager, &aggregator) { } diff --git a/src/plugins/qmlprofiler/tests/debugmessagesmodel_test.h b/src/plugins/qmlprofiler/tests/debugmessagesmodel_test.h index 581908e55b..23dcf277d4 100644 --- a/src/plugins/qmlprofiler/tests/debugmessagesmodel_test.h +++ b/src/plugins/qmlprofiler/tests/debugmessagesmodel_test.h @@ -51,6 +51,7 @@ private slots: private: QmlProfilerModelManager manager; + Timeline::TimelineModelAggregator aggregator; DebugMessagesModel model; }; diff --git a/src/plugins/qmlprofiler/tests/flamegraphmodel_test.cpp b/src/plugins/qmlprofiler/tests/flamegraphmodel_test.cpp index c2db018245..c4abc49084 100644 --- a/src/plugins/qmlprofiler/tests/flamegraphmodel_test.cpp +++ b/src/plugins/qmlprofiler/tests/flamegraphmodel_test.cpp @@ -37,10 +37,11 @@ FlameGraphModelTest::FlameGraphModelTest(QObject *parent) : { } -int FlameGraphModelTest::generateData(QmlProfilerModelManager *manager) +int FlameGraphModelTest::generateData(QmlProfilerModelManager *manager, + Timeline::TimelineModelAggregator *aggregator) { // Notes only work with timeline models - QmlProfilerRangeModel *rangeModel = new QmlProfilerRangeModel(manager, Javascript, manager); + QmlProfilerRangeModel *rangeModel = new QmlProfilerRangeModel(manager, Javascript, aggregator); int rangeModelId = rangeModel->modelId(); manager->notesModel()->addTimelineModel(rangeModel); @@ -95,7 +96,7 @@ int FlameGraphModelTest::generateData(QmlProfilerModelManager *manager) void FlameGraphModelTest::initTestCase() { QCOMPARE(model.modelManager(), &manager); - rangeModelId = generateData(&manager); + rangeModelId = generateData(&manager, &aggregator); QCOMPARE(manager.state(), QmlProfilerModelManager::Done); } diff --git a/src/plugins/qmlprofiler/tests/flamegraphmodel_test.h b/src/plugins/qmlprofiler/tests/flamegraphmodel_test.h index 1099ee6200..627a217d20 100644 --- a/src/plugins/qmlprofiler/tests/flamegraphmodel_test.h +++ b/src/plugins/qmlprofiler/tests/flamegraphmodel_test.h @@ -27,6 +27,9 @@ #include <qmlprofiler/flamegraphmodel.h> #include <qmlprofiler/qmlprofilermodelmanager.h> + +#include <timeline/timelinemodelaggregator.h> + #include <QObject> namespace QmlProfiler { @@ -37,7 +40,8 @@ class FlameGraphModelTest : public QObject Q_OBJECT public: FlameGraphModelTest(QObject *parent = nullptr); - static int generateData(QmlProfilerModelManager *manager); + static int generateData(QmlProfilerModelManager *manager, + Timeline::TimelineModelAggregator *aggregator); private slots: void initTestCase(); @@ -50,6 +54,7 @@ private slots: private: QmlProfilerModelManager manager; + Timeline::TimelineModelAggregator aggregator; FlameGraphModel model; int rangeModelId = -1; }; diff --git a/src/plugins/qmlprofiler/tests/flamegraphview_test.cpp b/src/plugins/qmlprofiler/tests/flamegraphview_test.cpp index e371bf584d..732128ab5a 100644 --- a/src/plugins/qmlprofiler/tests/flamegraphview_test.cpp +++ b/src/plugins/qmlprofiler/tests/flamegraphview_test.cpp @@ -34,7 +34,8 @@ namespace QmlProfiler { namespace Internal { -FlameGraphViewTest::FlameGraphViewTest(QObject *parent) : QObject(parent), view(&manager) +FlameGraphViewTest::FlameGraphViewTest(QObject *parent) + : QObject(parent), view(&manager) { } @@ -42,7 +43,7 @@ void FlameGraphViewTest::initTestCase() { connect(&view, &QmlProfilerEventsView::showFullRange, this, [this](){ manager.restrictToRange(-1, -1); }); - FlameGraphModelTest::generateData(&manager); + FlameGraphModelTest::generateData(&manager, &aggregator); QCOMPARE(manager.state(), QmlProfilerModelManager::Done); view.resize(500, 500); view.show(); diff --git a/src/plugins/qmlprofiler/tests/flamegraphview_test.h b/src/plugins/qmlprofiler/tests/flamegraphview_test.h index c99a2177d2..2729306412 100644 --- a/src/plugins/qmlprofiler/tests/flamegraphview_test.h +++ b/src/plugins/qmlprofiler/tests/flamegraphview_test.h @@ -27,6 +27,9 @@ #include <qmlprofiler/flamegraphview.h> #include <qmlprofiler/qmlprofilermodelmanager.h> + +#include <timeline/timelinemodelaggregator.h> + #include <QObject> namespace QmlProfiler { @@ -46,6 +49,7 @@ private slots: private: QmlProfilerModelManager manager; + Timeline::TimelineModelAggregator aggregator; FlameGraphView view; }; diff --git a/src/plugins/qmlprofiler/tests/inputeventsmodel_test.cpp b/src/plugins/qmlprofiler/tests/inputeventsmodel_test.cpp index fb6896e6f1..b92eca9f93 100644 --- a/src/plugins/qmlprofiler/tests/inputeventsmodel_test.cpp +++ b/src/plugins/qmlprofiler/tests/inputeventsmodel_test.cpp @@ -38,7 +38,7 @@ static InputEventType inputType(int i) } InputEventsModelTest::InputEventsModelTest(QObject *parent) : - QObject(parent), manager(nullptr), model(&manager) + QObject(parent), model(&manager, &aggregator) { keyTypeId = manager.numEventTypes(); manager.addEventType(QmlEventType(Event, MaximumRangeType, Key)); diff --git a/src/plugins/qmlprofiler/tests/inputeventsmodel_test.h b/src/plugins/qmlprofiler/tests/inputeventsmodel_test.h index af8b4e39cb..16c92d83bb 100644 --- a/src/plugins/qmlprofiler/tests/inputeventsmodel_test.h +++ b/src/plugins/qmlprofiler/tests/inputeventsmodel_test.h @@ -51,6 +51,7 @@ private slots: private: QmlProfilerModelManager manager; + Timeline::TimelineModelAggregator aggregator; InputEventsModel model; int mouseTypeId = -1; diff --git a/src/plugins/qmlprofiler/tests/memoryusagemodel_test.cpp b/src/plugins/qmlprofiler/tests/memoryusagemodel_test.cpp index 92d1752461..8e7db17b7c 100644 --- a/src/plugins/qmlprofiler/tests/memoryusagemodel_test.cpp +++ b/src/plugins/qmlprofiler/tests/memoryusagemodel_test.cpp @@ -30,7 +30,7 @@ namespace QmlProfiler { namespace Internal { MemoryUsageModelTest::MemoryUsageModelTest(QObject *parent) : QObject(parent), - manager(nullptr), model(&manager) + model(&manager, &aggregator) { } diff --git a/src/plugins/qmlprofiler/tests/memoryusagemodel_test.h b/src/plugins/qmlprofiler/tests/memoryusagemodel_test.h index c8b1c4b8c1..2bd40aa6a4 100644 --- a/src/plugins/qmlprofiler/tests/memoryusagemodel_test.h +++ b/src/plugins/qmlprofiler/tests/memoryusagemodel_test.h @@ -54,6 +54,7 @@ private slots: private: QmlProfilerModelManager manager; + Timeline::TimelineModelAggregator aggregator; MemoryUsageModel model; int heapPageTypeId = -1; diff --git a/src/plugins/qmlprofiler/tests/pixmapcachemodel_test.cpp b/src/plugins/qmlprofiler/tests/pixmapcachemodel_test.cpp index c0148f2c83..0f4a0079b7 100644 --- a/src/plugins/qmlprofiler/tests/pixmapcachemodel_test.cpp +++ b/src/plugins/qmlprofiler/tests/pixmapcachemodel_test.cpp @@ -31,7 +31,7 @@ namespace QmlProfiler { namespace Internal { PixmapCacheModelTest::PixmapCacheModelTest(QObject *parent) : QObject(parent), - manager(nullptr), model(&manager) + model(&manager, &aggregator) { } diff --git a/src/plugins/qmlprofiler/tests/pixmapcachemodel_test.h b/src/plugins/qmlprofiler/tests/pixmapcachemodel_test.h index 8a6448bb10..f4f5819f35 100644 --- a/src/plugins/qmlprofiler/tests/pixmapcachemodel_test.h +++ b/src/plugins/qmlprofiler/tests/pixmapcachemodel_test.h @@ -48,6 +48,7 @@ private slots: private: QmlProfilerModelManager manager; + Timeline::TimelineModelAggregator aggregator; PixmapCacheModel model; int eventTypeIndices[2 * MaximumPixmapEventType]; diff --git a/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.cpp b/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.cpp index 6b18fde64f..98e3883c67 100644 --- a/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.cpp +++ b/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.cpp @@ -31,7 +31,7 @@ namespace QmlProfiler { namespace Internal { QmlProfilerAnimationsModelTest::QmlProfilerAnimationsModelTest(QObject *parent) : - QObject(parent), manager(nullptr), model(&manager) + QObject(parent), model(&manager, &aggregator) { } diff --git a/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.h b/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.h index c53515a205..4ce91a93ac 100644 --- a/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.h +++ b/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.h @@ -52,6 +52,7 @@ private slots: private: QmlProfilerModelManager manager; + Timeline::TimelineModelAggregator aggregator; QmlProfilerAnimationsModel model; }; diff --git a/src/plugins/qmlprofiler/tests/qmlprofilerbindingloopsrenderpass_test.cpp b/src/plugins/qmlprofiler/tests/qmlprofilerbindingloopsrenderpass_test.cpp index 54e1bb4c13..ab451e04e3 100644 --- a/src/plugins/qmlprofiler/tests/qmlprofilerbindingloopsrenderpass_test.cpp +++ b/src/plugins/qmlprofiler/tests/qmlprofilerbindingloopsrenderpass_test.cpp @@ -37,12 +37,13 @@ namespace Internal { class DummyModel : public QmlProfilerRangeModel { public: - DummyModel(QmlProfilerModelManager *manager); + DummyModel(QmlProfilerModelManager *manager, Timeline::TimelineModelAggregator *aggregator); void loadData(); }; -DummyModel::DummyModel(QmlProfilerModelManager *manager) : - QmlProfilerRangeModel(manager, Binding) +DummyModel::DummyModel(QmlProfilerModelManager *manager, + Timeline::TimelineModelAggregator *aggregator) : + QmlProfilerRangeModel(manager, Binding, aggregator) { } @@ -90,8 +91,9 @@ void QmlProfilerBindingLoopsRenderPassTest::testUpdate() inst->update(&renderer, &parentState, 0, 0, 0, true, 1); QCOMPARE(result, nullState); - QmlProfilerModelManager manager(nullptr); - DummyModel model(&manager); + QmlProfilerModelManager manager; + Timeline::TimelineModelAggregator aggregator; + DummyModel model(&manager, &aggregator); renderer.setModel(&model); result = inst->update(&renderer, &parentState, 0, 0, 0, true, 1); QCOMPARE(result, nullState); |