diff options
Diffstat (limited to 'src/widgets/kernel/qboxlayout.cpp')
-rw-r--r-- | src/widgets/kernel/qboxlayout.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/widgets/kernel/qboxlayout.cpp b/src/widgets/kernel/qboxlayout.cpp index 76d8533271..7b09adfbf0 100644 --- a/src/widgets/kernel/qboxlayout.cpp +++ b/src/widgets/kernel/qboxlayout.cpp @@ -278,7 +278,7 @@ void QBoxLayoutPrivate::setupGeom() int fixedSpacing = q->spacing(); int previousNonEmptyIndex = -1; - QStyle *style = 0; + QStyle *style = nullptr; if (fixedSpacing < 0) { if (QWidget *parentWidget = q->parentWidget()) style = parentWidget->style(); @@ -318,7 +318,7 @@ void QBoxLayoutPrivate::setupGeom() if (style) { spacing = style->combinedLayoutSpacing(actual1, actual2, horz(dir) ? Qt::Horizontal : Qt::Vertical, - 0, q->parentWidget()); + nullptr, q->parentWidget()); if (spacing < 0) spacing = 0; } @@ -433,10 +433,10 @@ QLayoutItem* QBoxLayoutPrivate::replaceAt(int index, QLayoutItem *item) { Q_Q(QBoxLayout); if (!item) - return 0; + return nullptr; QBoxLayoutItem *b = list.value(index); if (!b) - return 0; + return nullptr; QLayoutItem *r = b->item; b->item = item; @@ -551,7 +551,7 @@ QLayoutItem* QBoxLayoutPrivate::replaceAt(int index, QLayoutItem *item) \sa direction() */ QBoxLayout::QBoxLayout(Direction dir, QWidget *parent) - : QLayout(*new QBoxLayoutPrivate, 0, parent) + : QLayout(*new QBoxLayoutPrivate, nullptr, parent) { Q_D(QBoxLayout); d->dir = dir; @@ -684,7 +684,7 @@ int QBoxLayout::minimumHeightForWidth(int w) const Q_D(const QBoxLayout); (void) heightForWidth(w); int top, bottom; - d->effectiveMargins(0, &top, 0, &bottom); + d->effectiveMargins(nullptr, &top, nullptr, &bottom); return d->hasHfw ? (d->hfwMinHeight + top + bottom) : -1; } @@ -713,7 +713,7 @@ int QBoxLayout::count() const QLayoutItem *QBoxLayout::itemAt(int index) const { Q_D(const QBoxLayout); - return index >= 0 && index < d->list.count() ? d->list.at(index)->item : 0; + return index >= 0 && index < d->list.count() ? d->list.at(index)->item : nullptr; } /*! @@ -723,16 +723,16 @@ QLayoutItem *QBoxLayout::takeAt(int index) { Q_D(QBoxLayout); if (index < 0 || index >= d->list.count()) - return 0; + return nullptr; QBoxLayoutItem *b = d->list.takeAt(index); QLayoutItem *item = b->item; - b->item = 0; + b->item = nullptr; delete b; if (QLayout *l = item->layout()) { // sanity check in case the user passed something weird to QObject::setParent() if (l->parent() == this) - l->setParent(0); + l->setParent(nullptr); } invalidate(); @@ -1173,7 +1173,7 @@ void QBoxLayout::setDirection(Direction direction) if (box->magic) { QSpacerItem *sp = box->item->spacerItem(); if (sp) { - if (sp->expandingDirections() == Qt::Orientations(0) /*No Direction*/) { + if (sp->expandingDirections() == Qt::Orientations{} /*No Direction*/) { //spacing or strut QSize s = sp->sizeHint(); sp->changeSize(s.height(), s.width(), |