forked from qt-creator/qt-creator
Tracing: Move the type storage out of the trace manager
When we replay events we want to keep this constant and pass it to the event receivers as separate entity. This way we can move the replaying to a separate thread. When loading we will have a similar situation, but then the loading thread will create a new type storage and later assign that to the trace manager. Change-Id: I11402ed1e0663da6da5b61b15bba40e1a62adc4b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -100,8 +100,9 @@ void QmlProfilerToolTest::testClearEvents()
|
||||
stateManager->setServerRecording(true);
|
||||
QCOMPARE(modelManager->numEventTypes(), 0);
|
||||
QCOMPARE(modelManager->numEvents(), 0);
|
||||
modelManager->addEventType(QmlEventType());
|
||||
modelManager->addEvent(QmlEvent(0, 0, ""));
|
||||
const int typeIndex = modelManager->appendEventType(QmlEventType());
|
||||
QCOMPARE(typeIndex, 0);
|
||||
modelManager->addEvent(QmlEvent(0, typeIndex, ""));
|
||||
QCOMPARE(modelManager->numEventTypes(), 1);
|
||||
QCOMPARE(modelManager->numEvents(), 1);
|
||||
stateManager->setServerRecording(false);
|
||||
@@ -110,7 +111,7 @@ void QmlProfilerToolTest::testClearEvents()
|
||||
stateManager->setServerRecording(true); // clears previous events, but not types
|
||||
QCOMPARE(modelManager->numEventTypes(), 1);
|
||||
QCOMPARE(modelManager->numEvents(), 0);
|
||||
modelManager->addEvent(QmlEvent(0, 0, ""));
|
||||
modelManager->addEvent(QmlEvent(0, typeIndex, ""));
|
||||
QCOMPARE(modelManager->numEventTypes(), 1);
|
||||
QCOMPARE(modelManager->numEvents(), 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user