summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libs/timeline/timelinetracemanager.cpp48
-rw-r--r--src/libs/timeline/timelinetracemanager.h10
-rw-r--r--src/plugins/qmlprofiler/flamegraphmodel.cpp2
-rw-r--r--src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp1
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp91
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerstatewidget.h3
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp3
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp77
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.h4
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertraceview.cpp42
-rw-r--r--src/plugins/qmlprofiler/tests/debugmessagesmodel_test.cpp1
-rw-r--r--src/plugins/qmlprofiler/tests/flamegraphmodel_test.cpp1
-rw-r--r--src/plugins/qmlprofiler/tests/flamegraphview_test.cpp1
-rw-r--r--src/plugins/qmlprofiler/tests/inputeventsmodel_test.cpp1
-rw-r--r--src/plugins/qmlprofiler/tests/memoryusagemodel_test.cpp1
-rw-r--r--src/plugins/qmlprofiler/tests/pixmapcachemodel_test.cpp2
-rw-r--r--src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.cpp1
17 files changed, 94 insertions, 195 deletions
diff --git a/src/libs/timeline/timelinetracemanager.cpp b/src/libs/timeline/timelinetracemanager.cpp
index e568c87a4b..5a81d5a1f6 100644
--- a/src/libs/timeline/timelinetracemanager.cpp
+++ b/src/libs/timeline/timelinetracemanager.cpp
@@ -40,8 +40,6 @@ class TimelineTraceManager::TimelineTraceManagerPrivate
public:
TimelineNotesModel *notesModel = nullptr;
- TimelineTraceManager::State state = Empty;
-
int numEvents = 0;
int numEventTypes = 0;
quint64 availableFeatures = 0;
@@ -61,7 +59,6 @@ public:
void dispatch(const TraceEvent &event, const TraceEventType &type);
void reset();
- void setState(TimelineTraceManager *q, TimelineTraceManager::State state);
void updateTraceTime(qint64 time);
void restrictTraceTimeToRange(qint64 start, qint64 end);
};
@@ -184,20 +181,15 @@ void TimelineTraceManager::initialize()
{
for (const Initializer &initializer : qAsConst(d->initializers))
initializer();
-
- d->setState(this, AcquiringData);
}
void TimelineTraceManager::finalize()
{
- QTC_CHECK(state() == AcquiringData);
// Load notes after the timeline models have been initialized ...
// which happens on stateChanged(Done).
for (const Finalizer &finalizer : qAsConst(d->finalizers))
finalizer();
-
- d->setState(this, Done);
}
QFuture<void> TimelineTraceManager::save(const QString &filename)
@@ -335,35 +327,6 @@ void TimelineTraceManager::increaseTraceEnd(qint64 end)
}
}
-void TimelineTraceManager::TimelineTraceManagerPrivate::setState(
- TimelineTraceManager *q, TimelineTraceManager::State newState)
-{
- // It's not an error, we are continuously calling "AcquiringData" for example
- if (newState == state)
- return;
-
- switch (newState) {
- case ClearingData:
- QTC_CHECK(state == Done || state == Empty || state == AcquiringData);
- break;
- case Empty:
- // if it's not empty, complain but go on
- QTC_CHECK(q->isEmpty());
- break;
- case AcquiringData:
- break;
- case Done:
- QTC_ASSERT(state == AcquiringData || state == Empty, return);
- break;
- default:
- QTC_ASSERT(false, return);
- break;
- }
-
- state = newState;
- emit q->stateChanged(state);
-}
-
void TimelineTraceManager::TimelineTraceManagerPrivate::updateTraceTime(qint64 time)
{
QTC_ASSERT(time >= 0, return);
@@ -382,12 +345,6 @@ void TimelineTraceManager::TimelineTraceManagerPrivate::restrictTraceTimeToRange
restrictedTraceEnd = end;
}
-
-TimelineTraceManager::State TimelineTraceManager::state() const
-{
- return d->state;
-}
-
void TimelineTraceManager::setNotesModel(TimelineNotesModel *notesModel)
{
d->notesModel = notesModel;
@@ -410,17 +367,13 @@ void TimelineTraceManager::clearTypeStorage()
void TimelineTraceManager::clear()
{
- d->setState(this, ClearingData);
clearEventStorage();
- d->setState(this, Empty);
}
void TimelineTraceManager::clearAll()
{
- d->setState(this, ClearingData);
clearEventStorage();
clearTypeStorage();
- d->setState(this, Empty);
}
void TimelineTraceManager::restrictToRange(qint64 startTime, qint64 endTime)
@@ -428,7 +381,6 @@ void TimelineTraceManager::restrictToRange(qint64 startTime, qint64 endTime)
if (d->notesModel)
d->notesModel->stash();
- d->setState(this, ClearingData);
d->reset();
setVisibleFeatures(0);
diff --git a/src/libs/timeline/timelinetracemanager.h b/src/libs/timeline/timelinetracemanager.h
index a8ace50a14..fa5cffba97 100644
--- a/src/libs/timeline/timelinetracemanager.h
+++ b/src/libs/timeline/timelinetracemanager.h
@@ -42,13 +42,6 @@ class TIMELINE_EXPORT TimelineTraceManager : public QObject
{
Q_OBJECT
public:
- enum State {
- Empty,
- AcquiringData,
- ClearingData,
- Done
- };
-
typedef std::function<void(const TraceEvent &, const TraceEventType &)> TraceEventLoader;
typedef std::function<void()> Initializer;
typedef std::function<void()> Finalizer;
@@ -58,8 +51,6 @@ public:
explicit TimelineTraceManager(QObject *parent = nullptr);
~TimelineTraceManager();
- State state() const;
-
qint64 traceStart() const;
qint64 traceEnd() const;
qint64 traceDuration() const;
@@ -99,7 +90,6 @@ public:
signals:
void error(const QString &error);
- void stateChanged(State state);
void loadFinished();
void saveFinished();
diff --git a/src/plugins/qmlprofiler/flamegraphmodel.cpp b/src/plugins/qmlprofiler/flamegraphmodel.cpp
index 702bbedd82..4c62be82e6 100644
--- a/src/plugins/qmlprofiler/flamegraphmodel.cpp
+++ b/src/plugins/qmlprofiler/flamegraphmodel.cpp
@@ -159,8 +159,6 @@ void FlameGraphModel::restrictToFeatures(quint64 visibleFeatures)
return;
m_acceptedFeatures = visibleFeatures;
- if (m_modelManager->state() != QmlProfilerModelManager::Done)
- return;
clear();
diff --git a/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp b/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp
index 849dd70960..01aed56aa2 100644
--- a/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp
@@ -341,7 +341,6 @@ const char *QmlProfilerModelManager::featureName(ProfileFeature feature)
void QmlProfilerModelManager::finalize()
{
- QTC_ASSERT(state() == AcquiringData, /**/);
if (!d->file.flush())
emit error(tr("Failed to flush temporary trace file"));
d->detailsRewriter->reloadDocuments();
diff --git a/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp b/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp
index c25483490f..4eb2f9a418 100644
--- a/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp
@@ -37,6 +37,8 @@
#include <QTimer>
#include <QPointer>
+#include <functional>
+
namespace QmlProfiler {
namespace Internal {
@@ -72,17 +74,16 @@ QmlProfilerStateWidget::QmlProfilerStateWidget(QmlProfilerStateManager *stateMan
// profiler state
d->m_modelManager = modelManager;
- connect(d->m_modelManager, &QmlProfilerModelManager::stateChanged,
- this, &QmlProfilerStateWidget::update);
+
+ modelManager->registerFeatures(0, QmlProfilerModelManager::QmlEventLoader(),
+ std::bind(&QmlProfilerStateWidget::initialize, this),
+ std::bind(&QmlProfilerStateWidget::clear, this),
+ std::bind(&QmlProfilerStateWidget::clear, this));
d->m_profilerState = stateManager;
- connect(d->m_profilerState, &QmlProfilerStateManager::stateChanged,
- this, &QmlProfilerStateWidget::update);
- connect(d->m_profilerState, &QmlProfilerStateManager::serverRecordingChanged,
- this, &QmlProfilerStateWidget::update);
connect(&d->timer, &QTimer::timeout, this, &QmlProfilerStateWidget::updateDisplay);
d->timer.setInterval(1000);
- update();
+ setVisible(false);
}
QmlProfilerStateWidget::~QmlProfilerStateWidget()
@@ -97,6 +98,16 @@ void QmlProfilerStateWidget::reposition()
move(parentWidget->width()/2 - width()/2, parentWidget->height()/3 - height()/2);
}
+void QmlProfilerStateWidget::initialize()
+{
+ connect(d->m_profilerState, &QmlProfilerStateManager::stateChanged,
+ this, &QmlProfilerStateWidget::updateDisplay);
+ connect(d->m_profilerState, &QmlProfilerStateManager::serverRecordingChanged,
+ this, &QmlProfilerStateWidget::updateDisplay);
+ d->timer.start();
+ updateDisplay();
+}
+
void QmlProfilerStateWidget::showText(const QString &text)
{
setVisible(true);
@@ -105,69 +116,45 @@ void QmlProfilerStateWidget::showText(const QString &text)
reposition();
}
+void QmlProfilerStateWidget::clear()
+{
+ disconnect(d->m_profilerState, &QmlProfilerStateManager::stateChanged,
+ this, &QmlProfilerStateWidget::updateDisplay);
+ disconnect(d->m_profilerState, &QmlProfilerStateManager::serverRecordingChanged,
+ this, &QmlProfilerStateWidget::updateDisplay);
+ d->timer.stop();
+ setVisible(false);
+}
+
void QmlProfilerStateWidget::updateDisplay()
{
- if (!d->m_modelManager || !d->m_profilerState) {
- d->timer.stop();
- setVisible(false);
- return;
- }
+ QTC_ASSERT(d->m_modelManager, return);
+ QTC_ASSERT(d->m_profilerState, return);
// When application is being profiled
if (d->m_profilerState->serverRecording()) {
// Heuristic to not show the number if the application will only send the events when it
// stops. The number is still > 0 then because we get some StartTrace etc.
- uint numEvents = d->m_modelManager->numEvents();
+ const int numEvents = d->m_modelManager->numEvents();
showText(numEvents > 256 ? tr("Profiling application: %n events", nullptr, numEvents) :
tr("Profiling application"));
- return;
- }
-
- QmlProfilerModelManager::State state = d->m_modelManager->state();
- if (state == QmlProfilerModelManager::Done || state == QmlProfilerModelManager::Empty) {
+ } else if (d->m_modelManager->traceDuration() > 0 && d->m_modelManager->isEmpty()) {
// After profiling, there is an empty trace
- if (d->m_modelManager->traceDuration() > 0 && d->m_modelManager->isEmpty()) {
- showText(tr("No QML events recorded"));
- return;
- }
+ showText(tr("No QML events recorded"));
} else if (!d->m_modelManager->isEmpty()) {
- // When datamodel is acquiring or processing data
+ // When datamodel is acquiring data
if (d->m_profilerState->currentState() != QmlProfilerStateManager::Idle) {
- if (state == QmlProfilerModelManager::AcquiringData) {
- // we don't know how much more, so progress numbers are strange here
- showText(tr("Loading buffered data: %n events", nullptr,
- d->m_modelManager->numEvents()));
- } else if (state == QmlProfilerModelManager::ClearingData) {
- // when starting a second recording from the same process without aggregation
- showText(tr("Clearing old trace"));
- }
- } else if (state == QmlProfilerModelManager::AcquiringData) {
+ // we don't know how much more, so progress numbers are strange here
+ showText(tr("Loading buffered data: %n events", nullptr,
+ d->m_modelManager->numEvents()));
+ } else {
// Application died before all data could be read
showText(tr("Loading offline data: %n events", nullptr,
d->m_modelManager->numEvents()));
- } else if (state == QmlProfilerModelManager::ClearingData) {
- showText(tr("Clearing old trace"));
}
- return;
- } else if (state == QmlProfilerModelManager::AcquiringData) {
+ } else {
showText(tr("Waiting for data"));
- return;
}
-
- // There is a trace on view, hide this dialog
- setVisible(false);
-}
-
-void QmlProfilerStateWidget::update()
-{
- QmlProfilerModelManager::State state = d->m_modelManager ? d->m_modelManager->state()
- : QmlProfilerModelManager::Empty;
- if (state == QmlProfilerModelManager::AcquiringData)
- d->timer.start();
- else
- d->timer.stop();
-
- updateDisplay();
}
} // namespace Internal
diff --git a/src/plugins/qmlprofiler/qmlprofilerstatewidget.h b/src/plugins/qmlprofiler/qmlprofilerstatewidget.h
index 376ea09fa0..8358394726 100644
--- a/src/plugins/qmlprofiler/qmlprofilerstatewidget.h
+++ b/src/plugins/qmlprofiler/qmlprofilerstatewidget.h
@@ -45,8 +45,9 @@ public:
private:
void showText(const QString &text);
void updateDisplay();
- void update();
void reposition();
+ void initialize();
+ void clear();
class QmlProfilerStateWidgetPrivate;
QmlProfilerStateWidgetPrivate *d;
diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
index bb41405809..c274469aa8 100644
--- a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
@@ -96,7 +96,8 @@ void QmlProfilerStatisticsModel::restrictToFeatures(quint64 features)
}
}
}
- if (!didChange || m_modelManager->state() != QmlProfilerModelManager::Done)
+
+ if (!didChange)
return;
clear();
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index 0fba9affef..3325284830 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -149,8 +149,11 @@ QmlProfilerTool::QmlProfilerTool()
this, &QmlProfilerTool::clientsDisconnected);
d->m_profilerModelManager = new QmlProfilerModelManager(this);
- connect(d->m_profilerModelManager, &QmlProfilerModelManager::stateChanged,
- this, &QmlProfilerTool::profilerDataModelStateChanged);
+ d->m_profilerModelManager->registerFeatures(0, QmlProfilerModelManager::QmlEventLoader(),
+ std::bind(&QmlProfilerTool::initialize, this),
+ std::bind(&QmlProfilerTool::finalize, this),
+ std::bind(&QmlProfilerTool::clear, this));
+
connect(d->m_profilerModelManager, &QmlProfilerModelManager::error,
this, &QmlProfilerTool::showErrorDialog);
connect(d->m_profilerModelManager, &QmlProfilerModelManager::availableFeaturesChanged,
@@ -305,21 +308,6 @@ QmlProfilerTool::QmlProfilerTool()
d->m_recordButton->setToolTip(recording ? tr("Disable Profiling") : tr("Enable Profiling"));
d->m_recordButton->setIcon(recording ? recordOn : recordOff);
d->m_recordButton->setChecked(recording);
-
- switch (d->m_profilerModelManager->state()) {
- case QmlProfilerModelManager::Empty:
- case QmlProfilerModelManager::AcquiringData:
- case QmlProfilerModelManager::Done:
- // Don't change the recording button if the application cannot react to it.
- d->m_recordButton->setEnabled(d->m_profilerState->currentState()
- != QmlProfilerStateManager::AppStopRequested
- && d->m_profilerState->currentState()
- != QmlProfilerStateManager::AppDying);
- break;
- case QmlProfilerModelManager::ClearingData:
- d->m_recordButton->setEnabled(false);
- break;
- }
};
connect(d->m_profilerState, &QmlProfilerStateManager::stateChanged,
@@ -328,8 +316,6 @@ QmlProfilerTool::QmlProfilerTool()
d->m_recordButton, updateRecordButton);
connect(d->m_profilerState, &QmlProfilerStateManager::clientRecordingChanged,
d->m_recordButton, updateRecordButton);
- connect(d->m_profilerModelManager, &QmlProfilerModelManager::stateChanged,
- d->m_recordButton, updateRecordButton);
updateRecordButton();
}
@@ -434,11 +420,9 @@ void QmlProfilerTool::recordingButtonChanged(bool recording)
{
// clientRecording is our intention for new sessions. That may differ from the state of the
// current session, as indicated by the button. To synchronize it, toggle once.
-
if (recording && d->m_profilerState->currentState() == QmlProfilerStateManager::AppRunning) {
if (checkForUnsavedNotes()) {
- if (!d->m_profilerModelManager->aggregateTraces() ||
- d->m_profilerModelManager->state() == QmlProfilerModelManager::Done)
+ if (!d->m_profilerModelManager->aggregateTraces())
clearEvents(); // clear before the recording starts, unless we aggregate recordings
if (d->m_profilerState->clientRecording())
d->m_profilerState->setClientRecording(false);
@@ -485,8 +469,7 @@ void QmlProfilerTool::updateTimeDisplay()
}
Q_FALLTHROUGH();
case QmlProfilerStateManager::Idle:
- if (d->m_profilerModelManager->state() != QmlProfilerModelManager::Empty &&
- d->m_profilerModelManager->state() != QmlProfilerModelManager::ClearingData)
+ if (d->m_profilerModelManager->traceDuration() > 0)
seconds = d->m_profilerModelManager->traceDuration() / 1.0e9;
break;
}
@@ -735,7 +718,7 @@ void QmlProfilerTool::restoreFeatureVisibility()
void QmlProfilerTool::clientsDisconnected()
{
- if (d->m_profilerModelManager->state() == QmlProfilerModelManager::AcquiringData) {
+ if (d->m_toolBusy) {
if (d->m_profilerModelManager->aggregateTraces()) {
d->m_profilerModelManager->finalize();
} else {
@@ -802,28 +785,27 @@ void QmlProfilerTool::setRecordedFeatures(quint64 features)
action->setEnabled(features & (1ULL << action->data().toUInt()));
}
-void QmlProfilerTool::profilerDataModelStateChanged()
+void QmlProfilerTool::initialize()
{
- switch (d->m_profilerModelManager->state()) {
- case QmlProfilerModelManager::Empty :
- setButtonsEnabled(true);
- break;
- case QmlProfilerModelManager::ClearingData :
- clearTextMarks();
- setButtonsEnabled(false);
- clearDisplay();
- break;
- case QmlProfilerModelManager::AcquiringData :
- restoreFeatureVisibility();
- setButtonsEnabled(false); // Other buttons disabled
- break;
- case QmlProfilerModelManager::Done :
- showSaveOption();
- updateTimeDisplay();
- setButtonsEnabled(true);
- createTextMarks();
- break;
- }
+ restoreFeatureVisibility();
+ setButtonsEnabled(false); // Other buttons disabled
+}
+
+void QmlProfilerTool::finalize()
+{
+ showSaveOption();
+ updateTimeDisplay();
+ createTextMarks();
+ setButtonsEnabled(true);
+ d->m_recordButton->setEnabled(true);
+}
+
+void QmlProfilerTool::clear()
+{
+ clearTextMarks();
+ clearDisplay();
+ setButtonsEnabled(true);
+ d->m_recordButton->setEnabled(true);
}
QList <QAction *> QmlProfilerTool::profilerContextMenuActions()
@@ -913,8 +895,7 @@ void QmlProfilerTool::serverRecordingChanged()
d->m_recordingTimer.start();
d->m_recordingElapsedTime.start();
- if (!d->m_profilerModelManager->aggregateTraces() ||
- d->m_profilerModelManager->state() == QmlProfilerModelManager::Done)
+ if (!d->m_profilerModelManager->aggregateTraces())
clearEvents();
d->m_profilerModelManager->initialize();
} else {
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.h b/src/plugins/qmlprofiler/qmlprofilertool.h
index 3a60911ef0..c963b49fa9 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.h
+++ b/src/plugins/qmlprofiler/qmlprofilertool.h
@@ -104,6 +104,10 @@ private:
void createTextMarks();
void clearTextMarks();
+ void initialize();
+ void finalize();
+ void clear();
+
class QmlProfilerToolPrivate;
QmlProfilerToolPrivate *d;
};
diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
index aba480c570..3eb963d95f 100644
--- a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
@@ -96,33 +96,27 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, QmlProfilerViewManag
setObjectName("QmlProfiler.Timeline.Dock");
d->m_zoomControl = new Timeline::TimelineZoomControl(this);
- connect(modelManager, &QmlProfilerModelManager::stateChanged, this, [modelManager, this]() {
- switch (modelManager->state()) {
- case QmlProfilerModelManager::Done: {
- const qint64 start = modelManager->traceStart();
- const qint64 end = modelManager->traceEnd();
- d->m_zoomControl->setTrace(start, end);
- d->m_zoomControl->setRange(start, start + (end - start) / 10);
- Q_FALLTHROUGH();
+ modelManager->registerFeatures(0, QmlProfilerModelManager::QmlEventLoader(), [this]() {
+ if (d->m_suspendedModels.isEmpty()) {
+ // Temporarily remove the models, while we're changing them
+ d->m_suspendedModels = d->m_modelProxy->models();
+ d->m_modelProxy->setModels(QVariantList());
}
- case QmlProfilerModelManager::Empty:
+ // Otherwise models are suspended already. This can happen if either acquiring was
+ // aborted or we're doing a "restrict to range" which consists of a partial clearing and
+ // then re-acquiring of data.
+ }, [this, modelManager]() {
+ const qint64 start = modelManager->traceStart();
+ const qint64 end = modelManager->traceEnd();
+ d->m_zoomControl->setTrace(start, end);
+ d->m_zoomControl->setRange(start, start + (end - start) / 10);
+ d->m_modelProxy->setModels(d->m_suspendedModels);
+ d->m_suspendedModels.clear();
+ }, [this]() {
+ d->m_zoomControl->clear();
+ if (!d->m_suspendedModels.isEmpty()) {
d->m_modelProxy->setModels(d->m_suspendedModels);
d->m_suspendedModels.clear();
- d->m_modelManager->notesModel()->restore();
- break;
- case QmlProfilerModelManager::ClearingData:
- d->m_zoomControl->clear();
- Q_FALLTHROUGH();
- case QmlProfilerModelManager::AcquiringData:
- if (d->m_suspendedModels.isEmpty()) {
- // Temporarily remove the models, while we're changing them
- d->m_suspendedModels = d->m_modelProxy->models();
- d->m_modelProxy->setModels(QVariantList());
- }
- // Otherwise models are suspended already. This can happen if either acquiring was
- // aborted or we're doing a "restrict to range" which consists of a partial clearing and
- // then re-acquiring of data.
- break;
}
});
diff --git a/src/plugins/qmlprofiler/tests/debugmessagesmodel_test.cpp b/src/plugins/qmlprofiler/tests/debugmessagesmodel_test.cpp
index 8948e5dfbf..6a9941e662 100644
--- a/src/plugins/qmlprofiler/tests/debugmessagesmodel_test.cpp
+++ b/src/plugins/qmlprofiler/tests/debugmessagesmodel_test.cpp
@@ -53,7 +53,6 @@ void DebugMessagesModelTest::initTestCase()
manager.addEvent(event);
}
manager.finalize();
- QCOMPARE(manager.state(), QmlProfilerModelManager::Done);
}
void DebugMessagesModelTest::testTypeId()
diff --git a/src/plugins/qmlprofiler/tests/flamegraphmodel_test.cpp b/src/plugins/qmlprofiler/tests/flamegraphmodel_test.cpp
index b3ecb94014..f4ba520966 100644
--- a/src/plugins/qmlprofiler/tests/flamegraphmodel_test.cpp
+++ b/src/plugins/qmlprofiler/tests/flamegraphmodel_test.cpp
@@ -98,7 +98,6 @@ void FlameGraphModelTest::initTestCase()
{
QCOMPARE(model.modelManager(), &manager);
rangeModelId = generateData(&manager, &aggregator);
- QCOMPARE(manager.state(), QmlProfilerModelManager::Done);
}
void FlameGraphModelTest::testIndex()
diff --git a/src/plugins/qmlprofiler/tests/flamegraphview_test.cpp b/src/plugins/qmlprofiler/tests/flamegraphview_test.cpp
index afe31bd576..10b47fb61b 100644
--- a/src/plugins/qmlprofiler/tests/flamegraphview_test.cpp
+++ b/src/plugins/qmlprofiler/tests/flamegraphview_test.cpp
@@ -44,7 +44,6 @@ void FlameGraphViewTest::initTestCase()
connect(&view, &QmlProfilerEventsView::showFullRange,
this, [this](){ manager.restrictToRange(-1, -1); });
FlameGraphModelTest::generateData(&manager, &aggregator);
- QCOMPARE(manager.state(), QmlProfilerModelManager::Done);
view.resize(500, 500);
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
diff --git a/src/plugins/qmlprofiler/tests/inputeventsmodel_test.cpp b/src/plugins/qmlprofiler/tests/inputeventsmodel_test.cpp
index e61058eb55..e56f27aa4a 100644
--- a/src/plugins/qmlprofiler/tests/inputeventsmodel_test.cpp
+++ b/src/plugins/qmlprofiler/tests/inputeventsmodel_test.cpp
@@ -62,7 +62,6 @@ void InputEventsModelTest::initTestCase()
}
manager.finalize();
- QCOMPARE(manager.state(), QmlProfilerModelManager::Done);
}
void InputEventsModelTest::testAccepted()
diff --git a/src/plugins/qmlprofiler/tests/memoryusagemodel_test.cpp b/src/plugins/qmlprofiler/tests/memoryusagemodel_test.cpp
index e83a62333f..2f9d0bd566 100644
--- a/src/plugins/qmlprofiler/tests/memoryusagemodel_test.cpp
+++ b/src/plugins/qmlprofiler/tests/memoryusagemodel_test.cpp
@@ -97,7 +97,6 @@ void MemoryUsageModelTest::initTestCase()
manager.addEvent(event);
manager.finalize();
- QCOMPARE(manager.state(), QmlProfilerModelManager::Done);
QCOMPARE(model.count(), 11);
}
diff --git a/src/plugins/qmlprofiler/tests/pixmapcachemodel_test.cpp b/src/plugins/qmlprofiler/tests/pixmapcachemodel_test.cpp
index 2a962d3820..585eab951b 100644
--- a/src/plugins/qmlprofiler/tests/pixmapcachemodel_test.cpp
+++ b/src/plugins/qmlprofiler/tests/pixmapcachemodel_test.cpp
@@ -188,8 +188,6 @@ void PixmapCacheModelTest::initTestCase()
manager.finalize();
-
- QCOMPARE(manager.state(), QmlProfilerModelManager::Done);
}
void PixmapCacheModelTest::testConsistency()
diff --git a/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.cpp b/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.cpp
index e7adcee4ef..bccc4113b7 100644
--- a/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.cpp
+++ b/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.cpp
@@ -55,7 +55,6 @@ void QmlProfilerAnimationsModelTest::initTestCase()
manager.addEvent(event);
}
manager.finalize();
- QCOMPARE(manager.state(), QmlProfilerModelManager::Done);
}
void QmlProfilerAnimationsModelTest::testAccepted()