forked from qt-creator/qt-creator
Utils: Add an AspectContainer::changed() signal
In contrast to applied() only emitted if anything was dirty before. Ideally, applied() would not be needed, but I am not sure about downstream uses. Change-Id: Ie0c293b8730c503fc4409884a33207ee9ca5f129 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -2475,10 +2475,15 @@ void AspectContainer::setSettingsGroups(const QString &groupKey, const QString &
|
|||||||
|
|
||||||
void AspectContainer::apply()
|
void AspectContainer::apply()
|
||||||
{
|
{
|
||||||
|
const bool willChange = isDirty();
|
||||||
|
|
||||||
for (BaseAspect *aspect : std::as_const(d->m_items))
|
for (BaseAspect *aspect : std::as_const(d->m_items))
|
||||||
aspect->apply();
|
aspect->apply();
|
||||||
|
|
||||||
emit applied();
|
emit applied();
|
||||||
|
|
||||||
|
if (willChange)
|
||||||
|
emit changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AspectContainer::cancel()
|
void AspectContainer::cancel()
|
||||||
|
@@ -695,6 +695,7 @@ public:
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void applied();
|
void applied();
|
||||||
|
void changed();
|
||||||
void fromMapFinished();
|
void fromMapFinished();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user