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:
@@ -83,7 +83,7 @@ int QmlProfilerNotesModel::addQmlNote(int typeId, int collapsedRow, qint64 start
|
||||
}
|
||||
|
||||
|
||||
void QmlProfilerNotesModel::loadData()
|
||||
void QmlProfilerNotesModel::restore()
|
||||
{
|
||||
{
|
||||
QSignalBlocker blocker(this);
|
||||
@@ -97,7 +97,7 @@ void QmlProfilerNotesModel::loadData()
|
||||
emit changed(-1, -1, -1);
|
||||
}
|
||||
|
||||
void QmlProfilerNotesModel::saveData()
|
||||
void QmlProfilerNotesModel::stash()
|
||||
{
|
||||
// Keep notes that are outside the given range, overwrite the ones inside the range.
|
||||
m_notes = Utils::filtered(m_notes, [](const QmlNote ¬e) {
|
||||
|
||||
Reference in New Issue
Block a user