Fixing a segfault by -1 in plasma-netbook (special thanks to notmart).
svn path=/trunk/KDE/kdelibs/; revision=1075973
This commit is contained in:
parent
7c1ce3f4ec
commit
71dc3dea64
@ -46,7 +46,11 @@ QSizeF StackedLayout::sizeHint(Qt::SizeHint which, const QSizeF &constraint) con
|
||||
qreal left, top, right, bottom;
|
||||
getContentsMargins(&left, &top, &right, &bottom);
|
||||
|
||||
QSizeF currentWidgetSize = itemAt(m_currentWidgetIndex)->effectiveSizeHint(which, constraint);
|
||||
if (m_currentWidgetIndex <= 0 || !itemAt(m_currentWidgetIndex)) {
|
||||
return QSizeF();
|
||||
}
|
||||
|
||||
QSizeF currentWidgetSize = itemAt(m_currentWidgetIndex)->effectiveSizeHint(which, constraint);
|
||||
|
||||
return QSizeF( left + right + currentWidgetSize.width(), right + bottom + currentWidgetSize.height());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user