diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-04 16:29:09 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-06 09:06:16 (GMT) |
commit | 13833beb641289c45faed337848d37280195aadc (patch) | |
tree | 640401d51871f1eb4e948cf1884b810b5be4a198 /tools/designer | |
parent | 99160bb9f851bf02fe5345b5f52217b6c77a57c4 (diff) | |
download | Qt-13833beb641289c45faed337848d37280195aadc.zip Qt-13833beb641289c45faed337848d37280195aadc.tar.gz Qt-13833beb641289c45faed337848d37280195aadc.tar.bz2 |
Remove the use of deprecated qFindChild(ren)
Test directory untouched.
This just apply those regexp:
git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(this,* */f\\1(/'" qFindChild
git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(&\([^\(),]*\),* */\\2.f\\1(/'" qFindChild
git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(\([^\(),]*()\),* */\\2->f\\1(/'" qFindChild
git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(\([^\(),]*\):\([^\(),]*\),* */(\\2:\\3)->f\\1(/'" qFindChild
git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(\([^\(),]*\),* */\\2->f\\1(/'" qFindChild
Rev-by: dev mailing list
Diffstat (limited to 'tools/designer')
21 files changed, 50 insertions, 50 deletions
diff --git a/tools/designer/src/components/buddyeditor/buddyeditor.cpp b/tools/designer/src/components/buddyeditor/buddyeditor.cpp index e367f9a..4127d7c 100644 --- a/tools/designer/src/components/buddyeditor/buddyeditor.cpp +++ b/tools/designer/src/components/buddyeditor/buddyeditor.cpp @@ -153,13 +153,13 @@ void BuddyEditor::updateBackground() m_updating = true; QList<Connection *> newList; - const LabelList label_list = qFindChildren<QLabel*>(background()); + const LabelList label_list = background()->findChildren<QLabel*>(); foreach (QLabel *label, label_list) { const QString buddy_name = buddy(label, m_formWindow->core()); if (buddy_name.isEmpty()) continue; - const QList<QWidget *> targets = qFindChildren<QWidget*>(background(), buddy_name); + const QList<QWidget *> targets = background()->findChildren<QWidget*>(buddy_name); if (targets.isEmpty()) continue; @@ -238,12 +238,12 @@ void BuddyEditor::setBackground(QWidget *background) clear(); ConnectionEdit::setBackground(background); - const LabelList label_list = qFindChildren<QLabel*>(background); + const LabelList label_list = background->findChildren<QLabel*>(); foreach (QLabel *label, label_list) { const QString buddy_name = buddy(label, m_formWindow->core()); if (buddy_name.isEmpty()) continue; - QWidget *target = qFindChild<QWidget*>(background, buddy_name); + QWidget *target = background->findChild<QWidget*>(buddy_name); if (target == 0) continue; @@ -297,7 +297,7 @@ void BuddyEditor::endConnection(QWidget *target, const QPoint &pos) void BuddyEditor::widgetRemoved(QWidget *widget) { - QList<QWidget*> child_list = qFindChildren<QWidget*>(widget); + QList<QWidget*> child_list = widget->findChildren<QWidget*>(); child_list.prepend(widget); ConnectionSet remove_set; @@ -354,7 +354,7 @@ void BuddyEditor::deleteSelected() void BuddyEditor::autoBuddy() { // Any labels? - LabelList labelList = qFindChildren<QLabel*>(background()); + LabelList labelList = background()->findChildren<QLabel*>(); if (labelList.empty()) return; // Find already used buddies diff --git a/tools/designer/src/components/formeditor/formwindow.cpp b/tools/designer/src/components/formeditor/formwindow.cpp index 15775f6..eeb63e5 100644 --- a/tools/designer/src/components/formeditor/formwindow.cpp +++ b/tools/designer/src/components/formeditor/formwindow.cpp @@ -387,7 +387,7 @@ void FormWindow::setCursorToAll(const QCursor &c, QWidget *start) { #ifndef QT_NO_CURSOR start->setCursor(c); - const QWidgetList widgets = qFindChildren<QWidget*>(start); + const QWidgetList widgets = start->findChildren<QWidget*>(); foreach (QWidget *widget, widgets) { if (!qobject_cast<WidgetHandle*>(widget)) { widget->setCursor(c); @@ -945,7 +945,7 @@ bool FormWindow::isMainContainer(const QWidget *w) const void FormWindow::updateChildSelections(QWidget *w) { - const QWidgetList l = qFindChildren<QWidget*>(w); + const QWidgetList l = w->findChildren<QWidget*>(); if (!l.empty()) { const QWidgetList::const_iterator lcend = l.constEnd(); for (QWidgetList::const_iterator it = l.constBegin(); it != lcend; ++it) { @@ -1155,19 +1155,19 @@ bool FormWindow::unify(QObject *w, QString &s, bool changeIt) existingNames.insert(main->objectName()); const QDesignerMetaDataBaseInterface *metaDataBase = core()->metaDataBase(); - const QWidgetList widgetChildren = qFindChildren<QWidget*>(main); + const QWidgetList widgetChildren = main->findChildren<QWidget*>(); if (!widgetChildren.empty()) insertNames(metaDataBase, widgetChildren.constBegin(), widgetChildren.constEnd(), w, existingNames); - const QList<QLayout *> layoutChildren = qFindChildren<QLayout*>(main); + const QList<QLayout *> layoutChildren = main->findChildren<QLayout*>(); if (!layoutChildren.empty()) insertNames(metaDataBase, layoutChildren.constBegin(), layoutChildren.constEnd(), w, existingNames); - const QList<QAction *> actionChildren = qFindChildren<QAction*>(main); + const QList<QAction *> actionChildren = main->findChildren<QAction*>(); if (!actionChildren.empty()) insertNames(metaDataBase, actionChildren.constBegin(), actionChildren.constEnd(), w, existingNames); - const QList<QButtonGroup *> buttonGroupChildren = qFindChildren<QButtonGroup*>(main); + const QList<QButtonGroup *> buttonGroupChildren = main->findChildren<QButtonGroup*>(); if (!buttonGroupChildren.empty()) insertNames(metaDataBase, buttonGroupChildren.constBegin(), buttonGroupChildren.constEnd(), w, existingNames); @@ -1283,7 +1283,7 @@ void FormWindow::resizeWidget(QWidget *widget, const QRect &geometry) void FormWindow::raiseChildSelections(QWidget *w) { - const QWidgetList l = qFindChildren<QWidget*>(w); + const QWidgetList l = w->findChildren<QWidget*>(); if (l.isEmpty()) return; m_selection->raiseList(l); @@ -1344,7 +1344,7 @@ QWidgetList FormWindow::selectedWidgets() const void FormWindow::selectWidgets() { bool selectionChanged = false; - const QWidgetList l = qFindChildren<QWidget*>(mainContainer()); + const QWidgetList l = mainContainer()->findChildren<QWidget*>(); QListIterator <QWidget*> it(l); const QRect selRect(mapToGlobal(m_currRect.topLeft()), m_currRect.size()); while (it.hasNext()) { diff --git a/tools/designer/src/components/formeditor/qdesigner_resource.cpp b/tools/designer/src/components/formeditor/qdesigner_resource.cpp index 1d78695..135e23b 100644 --- a/tools/designer/src/components/formeditor/qdesigner_resource.cpp +++ b/tools/designer/src/components/formeditor/qdesigner_resource.cpp @@ -946,7 +946,7 @@ QWidget *QDesignerResource::create(DomWidget *ui_widget, QWidget *parentWidget) w->addAction(a); } else if (QActionGroup *g = m_actionGroups.value(name)) { w->addActions(g->actions()); - } else if (QMenu *menu = qFindChild<QMenu*>(w, name)) { + } else if (QMenu *menu = w->findChild<QMenu*>(name)) { w->addAction(menu->menuAction()); addMenuAction(menu->menuAction()); } @@ -1320,7 +1320,7 @@ DomLayout *QDesignerResource::createDom(QLayout *layout, DomLayout *ui_parentLay QDesignerMetaDataBaseItemInterface *item = core()->metaDataBase()->item(layout); if (item == 0) { - layout = qFindChild<QLayout*>(layout); + layout = layout->findChild<QLayout*>(); // refresh the meta database item item = core()->metaDataBase()->item(layout); } @@ -1440,7 +1440,7 @@ void QDesignerResource::applyTabStops(QWidget *widget, DomTabStops *tabStops) QList<QWidget*> tabOrder; foreach (const QString &widgetName, tabStops->elementTabStop()) { - if (QWidget *w = qFindChild<QWidget*>(widget, widgetName)) { + if (QWidget *w = widget->findChild<QWidget*>(widgetName)) { tabOrder.append(w); } } diff --git a/tools/designer/src/components/formeditor/qmainwindow_container.cpp b/tools/designer/src/components/formeditor/qmainwindow_container.cpp index 9b5326a..ef4ce85 100644 --- a/tools/designer/src/components/formeditor/qmainwindow_container.cpp +++ b/tools/designer/src/components/formeditor/qmainwindow_container.cpp @@ -104,7 +104,7 @@ Qt::DockWidgetArea dockWidgetArea(QDockWidget *me) QList<QLayout*> candidates; if (mw->layout()) { candidates.append(mw->layout()); - candidates += qFindChildren<QLayout*>(mw->layout()); + candidates += mw->layout()->findChildren<QLayout*>(); } foreach (QLayout *l, candidates) { if (l->indexOf(me) != -1) { diff --git a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp index 8674ac1..09c2233 100644 --- a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp +++ b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp @@ -245,7 +245,7 @@ namespace qdesigner_internal { ClassesMemberFunctions reverseClassesMemberFunctions(const QString &obj_name, MemberType member_type, const QString &peer, QDesignerFormWindowInterface *form) { - QObject *object = qFindChild<QObject*>(form, obj_name); + QObject *object = form->findChild<QObject*>(obj_name); if (!object) return ClassesMemberFunctions(); diff --git a/tools/designer/src/components/signalsloteditor/signalsloteditor.cpp b/tools/designer/src/components/signalsloteditor/signalsloteditor.cpp index b801c5e..1d45ef5 100644 --- a/tools/designer/src/components/signalsloteditor/signalsloteditor.cpp +++ b/tools/designer/src/components/signalsloteditor/signalsloteditor.cpp @@ -372,7 +372,7 @@ QObject *SignalSlotEditor::objectByName(QWidget *topLevel, const QString &name) if (topLevel->objectName() == name) object = topLevel; else - object = qFindChild<QObject*>(topLevel, name); + object = topLevel->findChild<QObject*>(name); const QDesignerMetaDataBaseInterface *mdb = formWindow()->core()->metaDataBase(); if (mdb->item(object)) return object; diff --git a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp index 5547761..530f176 100644 --- a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp +++ b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp @@ -117,7 +117,7 @@ static QStringList objectNameList(QDesignerFormWindowInterface *form) const QDesignerMetaDataBaseInterface *mdb = form->core()->metaDataBase(); // Add managed actions and actions with managed menus - const ActionList actions = qFindChildren<QAction*>(mainContainer); + const ActionList actions = mainContainer->findChildren<QAction*>(); if (!actions.empty()) { const ActionList::const_iterator cend = actions.constEnd(); for (ActionList::const_iterator it = actions.constBegin(); it != cend; ++it) { @@ -135,7 +135,7 @@ static QStringList objectNameList(QDesignerFormWindowInterface *form) } // Add managed buttons groups - const ButtonGroupList buttonGroups = qFindChildren<QButtonGroup *>(mainContainer); + const ButtonGroupList buttonGroups = mainContainer->findChildren<QButtonGroup *>(); if (!buttonGroups.empty()) { const ButtonGroupList::const_iterator cend = buttonGroups.constEnd(); for (ButtonGroupList::const_iterator it = buttonGroups.constBegin(); it != cend; ++it) @@ -658,7 +658,7 @@ QWidget *ConnectionDelegate::createEditor(QWidget *parent, const qdesigner_internal::ClassesMemberFunctions class_list = qdesigner_internal::reverseClassesMemberFunctions(obj_name, type, peer, m_form); - QObject *object = qFindChild<QObject*>(m_form, obj_name); + QObject *object = m_form->findChild<QObject*>(obj_name); inline_editor->addText(type == qdesigner_internal::SignalMember ? tr("<signal>") : tr("<slot>")); foreach (const qdesigner_internal::ClassMemberFunctions &class_info, class_list) { @@ -767,7 +767,7 @@ void SignalSlotEditorWindow::setActiveFormWindow(QDesignerFormWindowInterface *f } } - m_editor = qFindChild<SignalSlotEditor*>(form); + m_editor = form->findChild<SignalSlotEditor*>(); m_model->setEditor(m_editor); if (!m_editor.isNull()) { ConnectionDelegate *delegate diff --git a/tools/designer/src/components/widgetbox/widgetbox_dnditem.cpp b/tools/designer/src/components/widgetbox/widgetbox_dnditem.cpp index 25798d3..ac32795 100644 --- a/tools/designer/src/components/widgetbox/widgetbox_dnditem.cpp +++ b/tools/designer/src/components/widgetbox/widgetbox_dnditem.cpp @@ -185,7 +185,7 @@ static QWidget *decorationFromDomWidget(DomUI *dom_ui, QDesignerFormEditorInterf fakeTopLevel->setParent(0, Qt::ToolTip); // Container // Actual widget const DomWidget *domW = dom_ui->elementWidget()->elementWidget().front(); - QWidget *w = qFindChildren<QWidget*>(fakeTopLevel).front(); + QWidget *w = fakeTopLevel->findChildren<QWidget*>().front(); Q_ASSERT(w); // hack begin; // We set _q_dockDrag dynamic property which will be detected in drag enter event of form window. diff --git a/tools/designer/src/lib/shared/actioneditor.cpp b/tools/designer/src/lib/shared/actioneditor.cpp index 26ac8a8..664921e 100644 --- a/tools/designer/src/lib/shared/actioneditor.cpp +++ b/tools/designer/src/lib/shared/actioneditor.cpp @@ -288,7 +288,7 @@ void ActionEditor::setFormWindow(QDesignerFormWindowInterface *formWindow) return; if (m_formWindow != 0) { - const ActionList actionList = qFindChildren<QAction*>(m_formWindow->mainContainer()); + const ActionList actionList = m_formWindow->mainContainer()->findChildren<QAction*>(); foreach (QAction *action, actionList) disconnect(action, SIGNAL(changed()), this, SLOT(slotActionChanged())); } @@ -311,7 +311,7 @@ void ActionEditor::setFormWindow(QDesignerFormWindowInterface *formWindow) m_actionNew->setEnabled(true); m_filterWidget->setEnabled(true); - const ActionList actionList = qFindChildren<QAction*>(formWindow->mainContainer()); + const ActionList actionList = formWindow->mainContainer()->findChildren<QAction*>(); foreach (QAction *action, actionList) if (!action->isSeparator() && core()->metaDataBase()->item(action) != 0) { // Show unless it has a menu. However, listen for change on menu actions also as it might be removed diff --git a/tools/designer/src/lib/shared/connectionedit.cpp b/tools/designer/src/lib/shared/connectionedit.cpp index 0bebe47..fb6cf60 100644 --- a/tools/designer/src/lib/shared/connectionedit.cpp +++ b/tools/designer/src/lib/shared/connectionedit.cpp @@ -1395,7 +1395,7 @@ void ConnectionEdit::widgetRemoved(QWidget *widget) if (m_con_list.empty()) return; - QWidgetList child_list = qFindChildren<QWidget*>(widget); + QWidgetList child_list = widget->findChildren<QWidget*>(); child_list.prepend(widget); const ConnectionSet remove_set = findConnectionsOf(m_con_list, child_list.constBegin(), child_list.constEnd()); @@ -1545,7 +1545,7 @@ void ConnectionEdit::setSource(Connection *con, const QString &obj_name) { QObject *object = 0; if (!obj_name.isEmpty()) { - object = qFindChild<QObject*>(m_bg_widget, obj_name); + object = m_bg_widget->findChild<QObject*>(obj_name); if (object == 0 && m_bg_widget->objectName() == obj_name) object = m_bg_widget; @@ -1559,7 +1559,7 @@ void ConnectionEdit::setTarget(Connection *con, const QString &obj_name) { QObject *object = 0; if (!obj_name.isEmpty()) { - object = qFindChild<QObject*>(m_bg_widget, obj_name); + object = m_bg_widget->findChild<QObject*>(obj_name); if (object == 0 && m_bg_widget->objectName() == obj_name) object = m_bg_widget; diff --git a/tools/designer/src/lib/shared/layoutinfo.cpp b/tools/designer/src/lib/shared/layoutinfo.cpp index ad2dda4..309aa37 100644 --- a/tools/designer/src/lib/shared/layoutinfo.cpp +++ b/tools/designer/src/lib/shared/layoutinfo.cpp @@ -190,7 +190,7 @@ LayoutInfo::Type LayoutInfo::laidoutWidgetType(const QDesignerFormEditorInterfac } // 3) Some child layout (see below comment about Q3GroupBox) - const QList<QLayout*> childLayouts = qFindChildren<QLayout*>(parentLayout); + const QList<QLayout*> childLayouts = parentLayout->findChildren<QLayout*>(); if (childLayouts.empty()) return NoLayout; const QList<QLayout*>::const_iterator lcend = childLayouts.constEnd(); @@ -244,7 +244,7 @@ QLayout *LayoutInfo::managedLayout(const QDesignerFormEditorInterface *core, QLa * widget->layout() returns an internal VBoxLayout. */ const QDesignerMetaDataBaseItemInterface *item = metaDataBase->item(layout); if (item == 0) { - layout = qFindChild<QLayout*>(layout); + layout = layout->findChild<QLayout*>(); item = metaDataBase->item(layout); } if (!item) diff --git a/tools/designer/src/lib/shared/morphmenu.cpp b/tools/designer/src/lib/shared/morphmenu.cpp index de85d37..6dfac47 100644 --- a/tools/designer/src/lib/shared/morphmenu.cpp +++ b/tools/designer/src/lib/shared/morphmenu.cpp @@ -240,7 +240,7 @@ static QString suggestObjectName(const QString &oldClassName, const QString &new QLabel *buddyLabelOf(QDesignerFormWindowInterface *fw, QWidget *w) { typedef QList<QLabel*> LabelList; - const LabelList labelList = qFindChildren<QLabel*>(fw); + const LabelList labelList = fw->findChildren<QLabel*>(); if (labelList.empty()) return 0; const LabelList::const_iterator cend = labelList.constEnd(); diff --git a/tools/designer/src/lib/shared/qdesigner_command.cpp b/tools/designer/src/lib/shared/qdesigner_command.cpp index 69206df..9fe0e89 100644 --- a/tools/designer/src/lib/shared/qdesigner_command.cpp +++ b/tools/designer/src/lib/shared/qdesigner_command.cpp @@ -247,7 +247,7 @@ void InsertWidgetCommand::refreshBuddyLabels() { typedef QList<QLabel*> LabelList; - const LabelList label_list = qFindChildren<QLabel*>(formWindow()); + const LabelList label_list = formWindow()->findChildren<QLabel*>(); if (label_list.empty()) return; @@ -365,7 +365,7 @@ void ManageWidgetCommandHelper::init(const QDesignerFormWindowInterface *fw, QWi m_widget = widget; m_managedChildren.clear(); - const QWidgetList children = qFindChildren<QWidget *>(m_widget); + const QWidgetList children = m_widget->findChildren<QWidget *>(); if (children.empty()) return; diff --git a/tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp b/tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp index 490373e..675752e 100644 --- a/tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp +++ b/tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp @@ -115,7 +115,7 @@ void QDesignerFormWindowCommand::updateBuddies(QDesignerFormWindowInterface *for typedef QList<QLabel*> LabelList; - const LabelList label_list = qFindChildren<QLabel*>(form); + const LabelList label_list = form->findChildren<QLabel*>(); if (label_list.empty()) return; diff --git a/tools/designer/src/lib/shared/qdesigner_menu.cpp b/tools/designer/src/lib/shared/qdesigner_menu.cpp index 31a226a..bbab032 100644 --- a/tools/designer/src/lib/shared/qdesigner_menu.cpp +++ b/tools/designer/src/lib/shared/qdesigner_menu.cpp @@ -630,7 +630,7 @@ QDesignerMenu *QDesignerMenu::findActivatedMenu() const { QList<QDesignerMenu*> candidates; candidates.append(const_cast<QDesignerMenu*>(this)); - candidates += qFindChildren<QDesignerMenu*>(this); + candidates += findChildren<QDesignerMenu*>(); foreach (QDesignerMenu *m, candidates) { if (m == qApp->activeWindow()) @@ -867,7 +867,7 @@ void QDesignerMenu::closeMenuChain() w = w->parentWidget(); if (w) { - foreach (QMenu *subMenu, qFindChildren<QMenu*>(w)) { + foreach (QMenu *subMenu, w->findChildren<QMenu*>()) { subMenu->hide(); } } @@ -1323,7 +1323,7 @@ QAction *QDesignerMenu::safeActionAt(int index) const void QDesignerMenu::hideSubMenu() { m_lastSubMenuIndex = -1; - foreach (QMenu *subMenu, qFindChildren<QMenu*>(this)) { + foreach (QMenu *subMenu, findChildren<QMenu*>()) { subMenu->hide(); } } diff --git a/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp b/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp index ecd97fa..78c6bd9 100644 --- a/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp +++ b/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp @@ -134,7 +134,7 @@ QTabBar *QTabWidgetEventFilter::tabBar() const { // QTabWidget::tabBar() accessor is protected, grmbl... if (!m_cachedTabBar) { - const QList<QTabBar *> tabBars = qFindChildren<QTabBar *>(m_tabWidget); + const QList<QTabBar *> tabBars = m_tabWidget->findChildren<QTabBar *>(); Q_ASSERT(tabBars.size() == 1); m_cachedTabBar = tabBars.front(); } diff --git a/tools/designer/src/lib/shared/widgetfactory.cpp b/tools/designer/src/lib/shared/widgetfactory.cpp index c7b13a1..d686052 100644 --- a/tools/designer/src/lib/shared/widgetfactory.cpp +++ b/tools/designer/src/lib/shared/widgetfactory.cpp @@ -782,7 +782,7 @@ void WidgetFactory::applyStyleToTopLevel(QStyle *style, QWidget *widget) widget->setStyle(style); widget->setPalette(standardPalette); - const QWidgetList lst = qFindChildren<QWidget*>(widget); + const QWidgetList lst = widget->findChildren<QWidget*>(); const QWidgetList::const_iterator cend = lst.constEnd(); for (QWidgetList::const_iterator it = lst.constBegin(); it != cend; ++it) (*it)->setStyle(style); diff --git a/tools/designer/src/lib/shared/zoomwidget.cpp b/tools/designer/src/lib/shared/zoomwidget.cpp index f5d7434..5cf4ea2 100644 --- a/tools/designer/src/lib/shared/zoomwidget.cpp +++ b/tools/designer/src/lib/shared/zoomwidget.cpp @@ -328,7 +328,7 @@ void ZoomWidget::setWidget(QWidget *w, Qt::WindowFlags wFlags) scene().removeItem(m_proxy); if (QWidget *w = m_proxy->widget()) { // remove the event filter - if (QObject *evf = qFindChild<QObject*>(w, QLatin1String(zoomedEventFilterRedirectorNameC))) + if (QObject *evf = w->findChild<QObject*>(QLatin1String(zoomedEventFilterRedirectorNameC))) w->removeEventFilter(evf); } m_proxy->deleteLater(); diff --git a/tools/designer/src/lib/uilib/abstractformbuilder.cpp b/tools/designer/src/lib/uilib/abstractformbuilder.cpp index 6f009e3..a280876 100644 --- a/tools/designer/src/lib/uilib/abstractformbuilder.cpp +++ b/tools/designer/src/lib/uilib/abstractformbuilder.cpp @@ -341,7 +341,7 @@ QWidget *QAbstractFormBuilder::create(DomWidget *ui_widget, QWidget *parentWidge w->addAction(a); } else if (QActionGroup *g = m_actionGroups.value(name)) { w->addActions(g->actions()); - } else if (QMenu *menu = qFindChild<QMenu*>(w, name)) { + } else if (QMenu *menu = w->findChild<QMenu*>(name)) { w->addAction(menu->menuAction()); addMenuAction(menu->menuAction()); } @@ -365,7 +365,7 @@ QWidget *QAbstractFormBuilder::create(DomWidget *ui_widget, QWidget *parentWidge if (!zOrderNames.isEmpty()) { QList<QWidget *> zOrder = qVariantValue<QWidgetList>(w->property("_q_zOrder")); foreach (const QString &widgetName, zOrderNames) { - if (QWidget *child = qFindChild<QWidget*>(w, widgetName)) { + if (QWidget *child = w->findChild<QWidget*>(widgetName)) { if (child->parentWidget() == w) { zOrder.removeAll(child); zOrder.append(child); @@ -1603,14 +1603,14 @@ void QAbstractFormBuilder::applyTabStops(QWidget *widget, DomTabStops *tabStops) for (int i=0; i<l.size(); ++i) { const QString name = l.at(i); - QWidget *child = qFindChild<QWidget*>(widget, name); + QWidget *child = widget->findChild<QWidget*>(name); if (!child) { uiLibWarning(QCoreApplication::translate("QAbstractFormBuilder", "While applying tab stops: The widget '%1' could not be found.").arg(name)); continue; } if (i == 0) { - lastWidget = qFindChild<QWidget*>(widget, name); + lastWidget = widget->findChild<QWidget*>(name); continue; } else if (!child || !lastWidget) { continue; @@ -1618,7 +1618,7 @@ void QAbstractFormBuilder::applyTabStops(QWidget *widget, DomTabStops *tabStops) QWidget::setTabOrder(lastWidget, child); - lastWidget = qFindChild<QWidget*>(widget, name); + lastWidget = widget->findChild<QWidget*>(name); } } diff --git a/tools/designer/src/lib/uilib/formbuilder.cpp b/tools/designer/src/lib/uilib/formbuilder.cpp index c97daac..c7d4e90 100644 --- a/tools/designer/src/lib/uilib/formbuilder.cpp +++ b/tools/designer/src/lib/uilib/formbuilder.cpp @@ -319,7 +319,7 @@ QWidget *QFormBuilder::widgetByName(QWidget *topLevel, const QString &name) if (topLevel->objectName() == name) return topLevel; - return qFindChild<QWidget*>(topLevel, name); + return topLevel->findChild<QWidget*>(name); } static QObject *objectByName(QWidget *topLevel, const QString &name) @@ -328,7 +328,7 @@ static QObject *objectByName(QWidget *topLevel, const QString &name) if (topLevel->objectName() == name) return topLevel; - return qFindChild<QObject*>(topLevel, name); + return topLevel->findChild<QObject*>(name); } /*! diff --git a/tools/designer/src/lib/uilib/formbuilderextra.cpp b/tools/designer/src/lib/uilib/formbuilderextra.cpp index 6c3357f..0747974 100644 --- a/tools/designer/src/lib/uilib/formbuilderextra.cpp +++ b/tools/designer/src/lib/uilib/formbuilderextra.cpp @@ -136,7 +136,7 @@ bool QFormBuilderExtra::applyBuddy(const QString &buddyName, BuddyMode applyMode return false; } - const QWidgetList widgets = qFindChildren<QWidget*>(label->topLevelWidget(), buddyName); + const QWidgetList widgets = label->topLevelWidget()->findChildren<QWidget*>(buddyName); if (widgets.empty()) { label->setBuddy(0); return false; |