From 40d7fcc1d402d94f9e1fd5dd12da8e4f7ad97b44 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 17 May 2023 16:34:54 +0200 Subject: [PATCH] Utils: Remove check against 'autoapply' for some volatile aspect value This was based on the wrong assumption that on !autoapply aspects (i.e. aspects in settings pages the non-applied value would never be needed by user code. This is, however, not the case when e.g. temporary checkbox states or values in comboboxes are used to enable/disable parts of the ui while interacting with the page. Change-Id: I4fe6a0df8137083a0a0faecc3ba20792caa5a747 Reviewed-by: Reviewed-by: Alessandro Portale --- src/libs/utils/aspects.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/libs/utils/aspects.cpp b/src/libs/utils/aspects.cpp index 549a3942730..082f4f8244a 100644 --- a/src/libs/utils/aspects.cpp +++ b/src/libs/utils/aspects.cpp @@ -1224,7 +1224,6 @@ void StringAspect::addToLayout(LayoutItem &parent) QVariant StringAspect::volatileValue() const { - QTC_CHECK(!isAutoApply()); switch (d->m_displayStyle) { case PathChooserDisplay: QTC_ASSERT(d->m_pathChooserDisplay, return {}); @@ -1519,7 +1518,6 @@ QAction *BoolAspect::action() QVariant BoolAspect::volatileValue() const { - QTC_CHECK(!isAutoApply()); if (d->m_button) return d->m_button->isChecked(); if (d->m_groupBox) @@ -1530,7 +1528,6 @@ QVariant BoolAspect::volatileValue() const void BoolAspect::setVolatileValue(const QVariant &val) { - QTC_CHECK(!isAutoApply()); if (d->m_button) d->m_button->setChecked(val.toBool()); else if (d->m_groupBox) @@ -1660,7 +1657,6 @@ void SelectionAspect::addToLayout(Layouting::LayoutItem &parent) QVariant SelectionAspect::volatileValue() const { - QTC_CHECK(!isAutoApply()); switch (d->m_displayStyle) { case DisplayStyle::RadioButtons: QTC_ASSERT(d->m_buttonGroup, return {}); @@ -1674,7 +1670,6 @@ QVariant SelectionAspect::volatileValue() const void SelectionAspect::setVolatileValue(const QVariant &val) { - QTC_CHECK(!isAutoApply()); switch (d->m_displayStyle) { case DisplayStyle::RadioButtons: { if (d->m_buttonGroup) {