forked from qt-creator/qt-creator
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: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user