Utils: Make AspectContainer a QObject

... and add a 'void applied()' signal.

I actually wanted to avoid that, but it seems to be a recurring
pattern of usage to do something on top of plain apply for all
children, like triggering IVersionControl::configurationChanged
in the VCS plugins.

Change-Id: Ib64c3147c6ba30b178237e51a3a377a291c550f2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2021-03-31 12:37:34 +02:00
parent c24291648b
commit 6b82af5990
4 changed files with 13 additions and 6 deletions

View File

@@ -2089,8 +2089,8 @@ public:
} // Internal
AspectContainer::AspectContainer()
: d(new Internal::AspectContainerPrivate)
AspectContainer::AspectContainer(QObject *parent)
: QObject(parent), d(new Internal::AspectContainerPrivate)
{}
/*!
@@ -2192,6 +2192,8 @@ void AspectContainer::apply()
{
for (BaseAspect *aspect : qAsConst(d->m_items))
aspect->apply();
emit applied();
}
void AspectContainer::cancel()