summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-10-18 14:12:46 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-12-13 12:50:10 (GMT)
commit3e2cb226277998a7841c85048493c89bc1ccc95f (patch)
treee8d5416717dfd1af7fc11d6014356a1ef6cb1ad4 /src/gui
parent19148694b1e094ad968e26e6fab448d3d2c7f4d4 (diff)
downloadQt-3e2cb226277998a7841c85048493c89bc1ccc95f.zip
Qt-3e2cb226277998a7841c85048493c89bc1ccc95f.tar.gz
Qt-3e2cb226277998a7841c85048493c89bc1ccc95f.tar.bz2
Cocoa: Fix addChildWindow bug where we connect a grandparent to a child
A plain bug where we ask for a list of widgets, but forget that qFindChildren is recursive, which is not what we want. Reviewed-by: jbache
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qwidget_mac.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 08af3ac..b89cb88 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -2834,9 +2834,9 @@ void QWidgetPrivate::setSubWindowStacking(bool set)
}
}
- QList<QWidget *> widgets = q->findChildren<QWidget *>();
+ QObjectList widgets = q->children();
for (int i=0; i<widgets.size(); ++i) {
- QWidget *child = widgets.at(i);
+ QWidget *child = qobject_cast<QWidget *>(widgets.at(i));
if (child && child->isWindow()) {
if (NSWindow *cwin = [qt_mac_nativeview_for(child) window]) {
if (set) {