Tracing: Move event storage out of trace manager

This is a step toward making the trace manager non-virtual. It should
just juggle the storages for types and events, and manage the threads to
access them. It doesn't need to know what exactly it stores.

Change-Id: I45093c60d8ae921e68aeb09bd48d24d5877ce306
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ulf Hermann
2018-05-07 13:26:05 +02:00
parent e6d583913e
commit 916883e70f
17 changed files with 218 additions and 136 deletions

View File

@@ -40,17 +40,16 @@ DebugMessagesModelTest::DebugMessagesModelTest(QObject *parent) :
void DebugMessagesModelTest::initTestCase()
{
manager.initialize();
QmlEvent event;
event.setTypeIndex(-1);
for (int i = 0; i < 10; ++i) {
QmlEvent event;
event.setTimestamp(i);
event.setString(QString::fromLatin1("message %1").arg(i));
QmlEventType type(DebugMessage, MaximumRangeType, i % (QtMsgType::QtInfoMsg + 1),
QmlEventLocation("somefile.js", i, 10 - i));
event.setTypeIndex(manager.numEventTypes());
manager.appendEventType(std::move(type));
manager.addEvent(event);
manager.appendEvent(std::move(event));
}
manager.finalize();
}