forked from qt-creator/qt-creator
Utils: Fix constness in AspectList functions
Change-Id: I960e02e1a193856de3ed0e090fdf694884a28ac5 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -3089,7 +3089,7 @@ QList<std::shared_ptr<BaseAspect>> AspectList::volatileItems() const
|
||||
return d->volatileItems;
|
||||
}
|
||||
|
||||
std::shared_ptr<BaseAspect> AspectList::addItem(std::shared_ptr<BaseAspect> item)
|
||||
std::shared_ptr<BaseAspect> AspectList::addItem(const std::shared_ptr<BaseAspect> &item)
|
||||
{
|
||||
if (undoStack())
|
||||
pushUndo(new AddItemCommand(this, item));
|
||||
@@ -3099,7 +3099,7 @@ std::shared_ptr<BaseAspect> AspectList::addItem(std::shared_ptr<BaseAspect> item
|
||||
return item;
|
||||
}
|
||||
|
||||
void AspectList::actualRemoveItem(std::shared_ptr<BaseAspect> item)
|
||||
void AspectList::actualRemoveItem(const std::shared_ptr<BaseAspect> &item)
|
||||
{
|
||||
d->volatileItems.removeOne(item);
|
||||
if (d->itemRemoved)
|
||||
@@ -3109,7 +3109,7 @@ void AspectList::actualRemoveItem(std::shared_ptr<BaseAspect> item)
|
||||
d->items = d->volatileItems;
|
||||
}
|
||||
|
||||
void AspectList::removeItem(std::shared_ptr<BaseAspect> item)
|
||||
void AspectList::removeItem(const std::shared_ptr<BaseAspect> &item)
|
||||
{
|
||||
if (undoStack())
|
||||
pushUndo(new RemoveItemCommand(this, item));
|
||||
|
@@ -1013,11 +1013,11 @@ public:
|
||||
QList<std::shared_ptr<BaseAspect>> items() const;
|
||||
QList<std::shared_ptr<BaseAspect>> volatileItems() const;
|
||||
|
||||
std::shared_ptr<BaseAspect> addItem(std::shared_ptr<BaseAspect> item);
|
||||
std::shared_ptr<BaseAspect> addItem(const std::shared_ptr<BaseAspect> &item);
|
||||
std::shared_ptr<BaseAspect> actualAddItem(const std::shared_ptr<BaseAspect> &item);
|
||||
|
||||
void removeItem(std::shared_ptr<BaseAspect> item);
|
||||
void actualRemoveItem(std::shared_ptr<BaseAspect> item);
|
||||
void removeItem(const std::shared_ptr<BaseAspect> &item);
|
||||
void actualRemoveItem(const std::shared_ptr<BaseAspect> &item);
|
||||
|
||||
void apply() override;
|
||||
|
||||
|
Reference in New Issue
Block a user