tools/designer/src/lib/uilib/abstractformbuilder.cpp
changeset 18 2f34d5167611
parent 3 41300fa6a67c
child 33 3e2da88830cd
equal deleted inserted replaced
3:41300fa6a67c 18:2f34d5167611
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the Qt Designer of the Qt Toolkit.
     7 ** This file is part of the Qt Designer of the Qt Toolkit.
     8 **
     8 **
   362         w->setAttribute(Qt::WA_Moved, false); // So that QDialog::setVisible(true) will center it
   362         w->setAttribute(Qt::WA_Moved, false); // So that QDialog::setVisible(true) will center it
   363 
   363 
   364     const QStringList zOrderNames = ui_widget->elementZOrder();
   364     const QStringList zOrderNames = ui_widget->elementZOrder();
   365     if (!zOrderNames.isEmpty()) {
   365     if (!zOrderNames.isEmpty()) {
   366         QList<QWidget *> zOrder = qVariantValue<QWidgetList>(w->property("_q_zOrder"));
   366         QList<QWidget *> zOrder = qVariantValue<QWidgetList>(w->property("_q_zOrder"));
   367         foreach (QString widgetName, zOrderNames) {
   367         foreach (const QString &widgetName, zOrderNames) {
   368             if (QWidget *child = qFindChild<QWidget*>(w, widgetName)) {
   368             if (QWidget *child = qFindChild<QWidget*>(w, widgetName)) {
   369                 if (child->parentWidget() == w) {
   369                 if (child->parentWidget() == w) {
   370                     zOrder.removeAll(child);
   370                     zOrder.removeAll(child);
   371                     zOrder.append(child);
   371                     zOrder.append(child);
   372                     child->raise();
   372                     child->raise();