forked from qt-creator/qt-creator
Timeline: Add stash() and restore() methods to notes model
Those are needed when manipulating the model in a way that may change the indices, like restricting to a range or filtering by categories. Change-Id: I9f218d269cf23104c306960ef77c0fc41591daa1 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -536,7 +536,7 @@ void QmlProfilerModelManager::save(const QString &filename)
|
||||
return;
|
||||
}
|
||||
|
||||
d->notesModel->saveData();
|
||||
d->notesModel->stash();
|
||||
|
||||
QmlProfilerFileWriter *writer = new QmlProfilerFileWriter(this);
|
||||
writer->setTraceTime(traceTime()->startTime(), traceTime()->endTime(),
|
||||
@@ -713,7 +713,7 @@ void QmlProfilerModelManager::clear()
|
||||
|
||||
void QmlProfilerModelManager::restrictToRange(qint64 startTime, qint64 endTime)
|
||||
{
|
||||
d->notesModel->saveData();
|
||||
d->notesModel->stash();
|
||||
const QVector<QmlNote> notes = d->notesModel->notes();
|
||||
d->notesModel->clear();
|
||||
|
||||
|
Reference in New Issue
Block a user