set default hints when repr doesn't export Layout.*
when we go from full to compact repr, if the compact doesn't export a Layout attached property, the hints shouldn't remain those of the full repr, so reset to default values BUG:377153 Reviewed-by:Eike Hein
This commit is contained in:
parent
fba9e9e151
commit
b99a87a320
@ -92,7 +92,19 @@ void AppletQuickItemPrivate::connectLayoutAttached(QObject *item)
|
||||
}
|
||||
}
|
||||
|
||||
//if the compact repr doesn't export a Layout.* attached property,
|
||||
//reset our own with default values
|
||||
if (!layout) {
|
||||
if (ownLayout) {
|
||||
ownLayout->setProperty("minimumWidth", 0);
|
||||
ownLayout->setProperty("minimumHeight", 0);
|
||||
ownLayout->setProperty("preferredWidth", -1);
|
||||
ownLayout->setProperty("preferredHeight", -1);
|
||||
ownLayout->setProperty("maximumWidth", std::numeric_limits<qreal>::infinity());
|
||||
ownLayout->setProperty("maximumHeight", std::numeric_limits<qreal>::infinity());
|
||||
ownLayout->setProperty("fillWidth", false);
|
||||
ownLayout->setProperty("fillHeight", false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user