Commit d12c5c0d authored by Don Gagne's avatar Don Gagne

Add clearAndDeleteContents

parent db025ef9
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment