diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-12-09 01:00:35 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2019-12-09 10:16:01 +0100 |
commit | bef74b6c3a0a9c8649ea8eb333d80015f76863e4 (patch) | |
tree | 41cdf5b6776c90a6d04a1d6680f4d47a90593746 /src/widgets/kernel/qstackedlayout.cpp | |
parent | f8d2975b6a8b36bf8dd304c99783947a72081b79 (diff) | |
parent | 4c3c63d4cbb81b38e88e06b72749e7e01497b6f1 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia24cc8b86def0d9d9c17d6775cc519e491b860b1
Diffstat (limited to 'src/widgets/kernel/qstackedlayout.cpp')
-rw-r--r-- | src/widgets/kernel/qstackedlayout.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/widgets/kernel/qstackedlayout.cpp b/src/widgets/kernel/qstackedlayout.cpp index 0412dc188d..f87fe96cc0 100644 --- a/src/widgets/kernel/qstackedlayout.cpp +++ b/src/widgets/kernel/qstackedlayout.cpp @@ -61,11 +61,11 @@ QLayoutItem* QStackedLayoutPrivate::replaceAt(int idx, QLayoutItem *newitem) { Q_Q(QStackedLayout); if (idx < 0 || idx >= list.size() || !newitem) - return 0; + return nullptr; QWidget *wdg = newitem->widget(); if (Q_UNLIKELY(!wdg)) { qWarning("QStackedLayout::replaceAt: Only widgets can be added"); - return 0; + return nullptr; } QLayoutItem *orgitem = list.at(idx); list.replace(idx, newitem); @@ -154,7 +154,7 @@ QLayoutItem* QStackedLayoutPrivate::replaceAt(int idx, QLayoutItem *newitem) \sa addWidget(), insertWidget() */ QStackedLayout::QStackedLayout() - : QLayout(*new QStackedLayoutPrivate, 0, 0) + : QLayout(*new QStackedLayoutPrivate, nullptr, nullptr) { } @@ -165,7 +165,7 @@ QStackedLayout::QStackedLayout() manage the geometry of its children. */ QStackedLayout::QStackedLayout(QWidget *parent) - : QLayout(*new QStackedLayoutPrivate, 0, parent) + : QLayout(*new QStackedLayoutPrivate, nullptr, parent) { } @@ -174,7 +174,7 @@ QStackedLayout::QStackedLayout(QWidget *parent) the given \a parentLayout. */ QStackedLayout::QStackedLayout(QLayout *parentLayout) - : QLayout(*new QStackedLayoutPrivate, parentLayout, 0) + : QLayout(*new QStackedLayoutPrivate, parentLayout, nullptr) { } @@ -264,7 +264,7 @@ QLayoutItem *QStackedLayout::takeAt(int index) { Q_D(QStackedLayout); if (index <0 || index >= d->list.size()) - return 0; + return nullptr; QLayoutItem *item = d->list.takeAt(index); if (index == d->index) { d->index = -1; @@ -307,7 +307,7 @@ void QStackedLayout::setCurrentIndex(int index) parent->setUpdatesEnabled(false); } - QPointer<QWidget> fw = parent ? parent->window()->focusWidget() : 0; + QPointer<QWidget> fw = parent ? parent->window()->focusWidget() : nullptr; const bool focusWasOnOldPage = fw && (prev && prev->isAncestorOf(fw)); if (prev) { |