Skip to content
Snippets Groups Projects
Commit d12c5c0d authored by Don Gagne's avatar Don Gagne
Browse files

Add clearAndDeleteContents

parent db025ef9
No related branches found
No related tags found
No related merge requests found
......@@ -228,3 +228,11 @@ void QmlObjectListModel::deleteListAndContents(void)
}
deleteLater();
}
void QmlObjectListModel::clearAndDeleteContents(void)
{
for (int i=0; i<_objectList.count(); i++) {
_objectList[i]->deleteLater();
}
clear();
}
......@@ -63,6 +63,9 @@ public:
/// Calls deleteLater on all items and this itself.
void deleteListAndContents(void);
/// Clears the list and calls delete on each entry
void clearAndDeleteContents(void);
signals:
void countChanged(int count);
void dirtyChanged(bool dirtyChanged);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment