aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-09-04 10:01:50 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-09-05 16:36:17 +0000
commitf6d74e89bbe9e4cf42eeb17cb4bdd0e415aa946f (patch)
tree4073829b06a87ee5e91b5e0e24207c90b03f9354 /src
parentc1563a67b7cce03c27367fab4d470b9ee129bd1f (diff)
Remove superfluous QQuickOverlayPrivate::popups
First of all, the name was a bit misleading. It was a list of _visible_ popups. Anyway, it is unnecessary to maintain such list anymore. The only use case for it was to resize the background dimming items of visible popups when the window was resized. For that infrequent desktop -only event, we can fetch the background dimming items from the list of all popups. Change-Id: Ie17db042719d4614189a78a2e5314136ca95df42 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quicktemplates2/qquickoverlay.cpp4
-rw-r--r--src/quicktemplates2/qquickoverlay_p_p.h1
2 files changed, 1 insertions, 4 deletions
diff --git a/src/quicktemplates2/qquickoverlay.cpp b/src/quicktemplates2/qquickoverlay.cpp
index f45b1049..d34fd7fc 100644
--- a/src/quicktemplates2/qquickoverlay.cpp
+++ b/src/quicktemplates2/qquickoverlay.cpp
@@ -281,7 +281,6 @@ void QQuickOverlay::itemChange(ItemChange change, const ItemChangeData &data)
return;
if (change == ItemChildAddedChange) {
- d->popups.append(popup);
if (popup->dim())
d->createOverlay(popup);
QObjectPrivate::connect(popup, &QQuickPopup::dimChanged, d, &QQuickOverlayPrivate::toggleOverlay);
@@ -293,7 +292,6 @@ void QQuickOverlay::itemChange(ItemChange change, const ItemChangeData &data)
QObjectPrivate::connect(popup, &QQuickPopup::aboutToHide, d, &QQuickOverlayPrivate::popupAboutToHide);
}
} else if (change == ItemChildRemovedChange) {
- d->popups.removeOne(popup);
d->destroyOverlay(popup);
QObjectPrivate::disconnect(popup, &QQuickPopup::dimChanged, d, &QQuickOverlayPrivate::toggleOverlay);
QObjectPrivate::disconnect(popup, &QQuickPopup::modalChanged, d, &QQuickOverlayPrivate::toggleOverlay);
@@ -310,7 +308,7 @@ void QQuickOverlay::geometryChanged(const QRectF &newGeometry, const QRectF &old
{
Q_D(QQuickOverlay);
QQuickItem::geometryChanged(newGeometry, oldGeometry);
- for (QQuickPopup *popup : d->popups)
+ for (QQuickPopup *popup : qAsConst(d->allPopups))
d->resizeOverlay(popup);
}
diff --git a/src/quicktemplates2/qquickoverlay_p_p.h b/src/quicktemplates2/qquickoverlay_p_p.h
index 7e63a99b..f9e962ee 100644
--- a/src/quicktemplates2/qquickoverlay_p_p.h
+++ b/src/quicktemplates2/qquickoverlay_p_p.h
@@ -87,7 +87,6 @@ public:
QQmlComponent *modal;
QQmlComponent *modeless;
- QVector<QQuickPopup *> popups;
QVector<QQuickPopup *> allPopups;
QVector<QQuickDrawer *> allDrawers;
QPointer<QQuickPopup> mouseGrabberPopup;