X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fwidgets%2Fflowlayout.cpp;h=efd862f97b1fb9581307fe92e920d9903b50f2dc;hb=04b0467582d8dfa989bb38fe18bfb1be20cea456;hp=31ba7fed425e53b74774363480499f85313e06ed;hpb=adf9e02242336548a384c23dadc062af7a2ef83a;p=pulseview.git diff --git a/pv/widgets/flowlayout.cpp b/pv/widgets/flowlayout.cpp index 31ba7fed..efd862f9 100644 --- a/pv/widgets/flowlayout.cpp +++ b/pv/widgets/flowlayout.cpp @@ -102,7 +102,7 @@ QLayoutItem *FlowLayout::takeAt(int index) if ((index >= 0) && (index < itemList.size())) return itemList.takeAt(index); else - return 0; + return nullptr; } Qt::Orientations FlowLayout::expandingDirections() const @@ -141,7 +141,7 @@ QSize FlowLayout::minimumSize() const if (w > size.width()) size.setWidth(w); - int h = item->geometry().y() + item->geometry().width(); + int h = item->geometry().y() + item->geometry().height(); if (h > size.height()) size.setHeight(h); } @@ -206,7 +206,7 @@ int FlowLayout::smartSpacing(QStyle::PixelMetric pm) const if (parent->isWidgetType()) { QWidget *pw = qobject_cast(parent); - return pw->style()->pixelMetric(pm, 0, pw); + return pw->style()->pixelMetric(pm, nullptr, pw); } else return static_cast(parent)->spacing(); }