CtfVisualizer: Allow strings for process and thread id

While the format document only uses numbers for these in its examples,
the data type is not really specified there and chrome://tracing itself
handles strings for them without complaint. On trace-generating side
std::thread::id can't easily be serialized as a number, and strings can
easily be supported in the viewer.

Change-Id: I36c8497049d4933058b9f72a28f24e1d1cf0d5bb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Eike Ziller
2023-09-08 10:17:29 +02:00
parent 67aab38873
commit c83047abb9
5 changed files with 48 additions and 32 deletions

View File

@@ -123,7 +123,7 @@ void CtfVisualizerTool::setAvailableThreads(const QList<CtfTimelineModel *> &thr
void CtfVisualizerTool::toggleThreadRestriction(QAction *action)
{
const int tid = action->data().toInt();
const QString tid = action->data().toString();
m_traceManager->setThreadRestriction(tid, action->isChecked());
}