Utils: Fix pathchooser handling for aspects

..especially when entering a path manually. Fixes some
soft asserts regarding the call guard and re-allows to
type a backslash directly to separate path from sub-path
instead of using wild workarounds like adding a dummy
character and adding the backslash before this.

Change-Id: I8cc8aaccf414d0fd9acc03d7c69e10ddd88dbfd9
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2023-05-22 11:42:32 +02:00
parent dfcfea478e
commit c5818cfe6d

View File

@@ -1134,7 +1134,7 @@ void StringAspect::addToLayout(LayoutItem &parent)
if (d->m_blockAutoApply) if (d->m_blockAutoApply)
return; return;
d->m_blockAutoApply = true; d->m_blockAutoApply = true;
setValue(d->m_pathChooserDisplay->filePath().toString()); setValueQuietly(d->m_pathChooserDisplay->filePath().toString());
d->m_blockAutoApply = false; d->m_blockAutoApply = false;
}; };
connect(d->m_pathChooserDisplay, &PathChooser::editingFinished, this, setPathChooserValue); connect(d->m_pathChooserDisplay, &PathChooser::editingFinished, this, setPathChooserValue);
@@ -1142,7 +1142,7 @@ void StringAspect::addToLayout(LayoutItem &parent)
} else { } else {
connect(d->m_pathChooserDisplay, &PathChooser::textChanged, connect(d->m_pathChooserDisplay, &PathChooser::textChanged,
this, [this](const QString &path) { this, [this](const QString &path) {
setValue(path); setValueQuietly(path);
}); });
} }
} }