forked from qt-creator/qt-creator
Utils: Add a AspectContainer::isDirty convenience function
Change-Id: I8503c715742bce8f59da9b0e6c7e7a85c5fc397b Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -2081,6 +2081,15 @@ void AspectContainer::setAutoApply(bool on)
|
||||
aspect->setAutoApply(on);
|
||||
}
|
||||
|
||||
bool AspectContainer::isDirty() const
|
||||
{
|
||||
for (BaseAspect *aspect : qAsConst(d->m_items)) {
|
||||
if (aspect->isDirty())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AspectContainer::equals(const AspectContainer &other) const
|
||||
{
|
||||
// FIXME: Expensive, but should not really be needed in a fully aspectified world.
|
||||
|
@@ -529,6 +529,7 @@ public:
|
||||
bool equals(const AspectContainer &other) const;
|
||||
void copyFrom(const AspectContainer &other);
|
||||
void setAutoApply(bool on);
|
||||
bool isDirty() const;
|
||||
|
||||
void forEachAspect(const std::function<void(BaseAspect *)> &run) const;
|
||||
|
||||
|
Reference in New Issue
Block a user