mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 03:12:56 +00:00
add missing braces in QStackedLayout::sizeHint() and QStackedLayout::minimumSize()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
8abefd8846
commit
30c67cecb2
1 changed files with 4 additions and 2 deletions
|
@ -423,7 +423,7 @@ QSize QStackedLayout::sizeHint() const
|
|||
QSize s(0, 0);
|
||||
int n = d->list.count();
|
||||
|
||||
for (int i = 0; i < n; ++i)
|
||||
for (int i = 0; i < n; ++i) {
|
||||
if (QWidget *widget = d->list.at(i)->widget()) {
|
||||
QSize ws(widget->sizeHint());
|
||||
if (widget->sizePolicy().horizontalPolicy() == QSizePolicy::Ignored)
|
||||
|
@ -432,6 +432,7 @@ QSize QStackedLayout::sizeHint() const
|
|||
ws.setHeight(0);
|
||||
s = s.expandedTo(ws);
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
|
@ -444,9 +445,10 @@ QSize QStackedLayout::minimumSize() const
|
|||
QSize s(0, 0);
|
||||
int n = d->list.count();
|
||||
|
||||
for (int i = 0; i < n; ++i)
|
||||
for (int i = 0; i < n; ++i) {
|
||||
if (QWidget *widget = d->list.at(i)->widget())
|
||||
s = s.expandedTo(qSmartMinSize(widget));
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue