forked from qt-creator/qt-creator
Utils: Add AspectList::createAndAddItem
Adds a function to add a "default" constructed new item to the list. Change-Id: I3d826b6f3e3705ae431efa5d778219f431509ea8 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -3127,6 +3127,11 @@ QList<std::shared_ptr<BaseAspect>> AspectList::volatileItems() const
|
||||
return d->volatileItems;
|
||||
}
|
||||
|
||||
std::shared_ptr<BaseAspect> AspectList::createAndAddItem()
|
||||
{
|
||||
return addItem(d->createItem());
|
||||
}
|
||||
|
||||
std::shared_ptr<BaseAspect> AspectList::addItem(const std::shared_ptr<BaseAspect> &item)
|
||||
{
|
||||
if (undoStack())
|
||||
|
||||
Reference in New Issue
Block a user