Merge remote-tracking branch 'origin/7.0'

Change-Id: Ica0f410a8248722cef95a9cbf3929a2d29bf91c0
This commit is contained in:
Eike Ziller
2022-04-27 11:19:31 +02:00
2 changed files with 5 additions and 3 deletions

View File

@@ -1091,13 +1091,15 @@ void StringAspect::addToLayout(LayoutBuilder &builder)
useMacroExpander(d->m_pathChooserDisplay->lineEdit());
if (isAutoApply()) {
if (d->m_autoApplyOnEditingFinished) {
connect(d->m_pathChooserDisplay, &PathChooser::editingFinished, this, [this] {
const auto setPathChooserValue = [this] {
if (d->m_blockAutoApply)
return;
d->m_blockAutoApply = true;
setValue(d->m_pathChooserDisplay->filePath().toString());
d->m_blockAutoApply = false;
});
};
connect(d->m_pathChooserDisplay, &PathChooser::editingFinished, this, setPathChooserValue);
connect(d->m_pathChooserDisplay, &PathChooser::browsingFinished, this, setPathChooserValue);
} else {
connect(d->m_pathChooserDisplay, &PathChooser::pathChanged,
this, [this](const QString &path) {

View File

@@ -409,7 +409,7 @@ int ManhattanStyle::styleHint(StyleHint hint, const QStyleOption *option, const
ret = QFormLayout::AllNonFixedFieldsGrow;
break;
case QStyle::SH_Widget_Animation_Duration:
if (widget->inherits("QTreeView"))
if (widget && widget->inherits("QTreeView"))
ret = 0;
break;
default: